Forum Discussion
some_analyst
Helper I
1 year agoChanging when 'Today' starts on the server
I have a slicer which shows me the date: Formatted Date Full =
VAR SelectedDate = dim_date[PK_date]
RETURN
IF(
SelectedDate = TODAY(),
"Today",
CONCATENATE(
CONCATENATE(dim_dat...
- 1 year ago
Hi some_analyst
Use UTCNOW() instead of TODAY() to reflect the current UTC time. Note that UTCTODAY() always returns the UTC datetime at 12:00 AM, regardless of the actual time of day in UTC. Also, you can simply the date format to just FORMAT(SelectedDate, "dddd, dd/mm/yyyy") instead of using CONCATENATE.
danextian
Super User
1 year agoNOW() is different from UTCNOW(). NOW depends on the timezone it is being evaluated.
some_analyst
Helper I
1 year agoso should I have this:
Formatted Date Full =
VAR RowDate = dim_date[PK_date] -- From your date table
VAR CurrentUTC12 = UTCNOW() + 0.5 -- Shift current time to UTC+12
VAR CurrentDateUTC12 = INT(CurrentUTC12) -- Strip time, keep just the date
RETURN
IF(
RowDate = CurrentDateUTC12,
"Today",
FORMAT(RowDate, "dddd, dd mmmm")
)