Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have following 2 variable and i cannot seem to pass variable to weekstart function it gives incorrect results.
LET vToday = today();
Let WeekStart = date(WeekStart($(vToday),0,6));
Results:
vToday=1/12/2017
WeekStart=12/24/1899
Try this ?
Let vWeekStart = date(WeekStart('$(vToday)',0,6));
putting quotes around vToday varibale worked
'$(vToday)'
Can you please explain the logic why single quote is required.
To my understanding the Datetime stores as a string value, so if we are using a variable value inside an expression or a function use I usually use single quotes. Thats the reason i believe we get some random dates. For eg: You can try below in a text object:
= Date('2015-10-12', 'YYYY-MM-DD') -> With Quotes
= Date(2015-10-12, 'YYYY-MM-DD') -> Without Quotes.
Thank You.