Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
RMDNA
Solution Sage
Solution Sage

DateTime.LocalNow to number conversion

Hi all,

 

I have a table in my report that contains "DateTime.Date(DateTime.LocalNow())" in order to provide a "last refreshed on:" card. What I'd like to do, for a forecasting piece, is only display events after that date.

 

Our event dates are structured as a whole number in the format "20170323," while DateTime returns a date "3/23/2017," so I need the refresh date as a number in order to filter by "greater than." 

 

When I attempt to convert the date to a whole number data type, it changes to (using the above date) 42817. Any tips?

15 REPLIES 15

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.