Power-Fx icon indicating copy to clipboard operation
Power-Fx copied to clipboard

Text(DateValue(Today()), "") Doesn't Return Today's Date in Unix Time

Open yunhapark97 opened this issue 1 year ago • 1 comments

Hi! Cards team has been running into issues when executing Text(DateValue(Today()), "") expression in Cards.

The same expression returns Today's date in Unix time in Canvas:

image

whereas an empty string ("") gets returned in Cards:

image

image

Any insights or guidance on this issue would be greatly appreciated. Thanks a lot for your time and help in advance!

yunhapark97 avatar May 07 '24 18:05 yunhapark97

This expression should give you the wanted result: Round((Now() - DateTime(1970,1,1, 0,0,0) ) * 86400000, 0)

You can replace Now() with another datetime value.

anderson-joyle avatar May 07 '24 20:05 anderson-joyle