Why does today() function always returns day in GMT instead of day in the current user time zone set in profile. To overcome this we had to build a rule to return date in user time zone. Is this expected behaviour of today() function because it is no where mentioned in documentation that function always returns date in GMT
Discussion posts and replies are publicly visible
Great! Local return only datetime format. But this logic return date format.
Then, please wrap that into a todate().
Here is the one liner -> todate(text(now(), "dd-MM-YYYY"))
To get current Datetime without timezone issues:
now()
To get current Date without timezone issues:
a!localVariables( local!currentDatetime: now(), date( year(local!currentDatetime), month(local!currentDatetime), day(local!currentDatetime) ))
todate() will work according to the timezone. For a specific time, this function would return the previous day or the next day depending on the timezone.
Thank you Stefan!!
This logic return correctly todate(local(now())). you can use this also..