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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
PPStar
Helper V
Helper V

Format DateTime.LocalNow()

Hello, 

I have a dataflow and i need to include the last refresh date in that dataflow. 

I created a new blank query and entered the following code : 

DateTime.LocalNow()
 
This correclty returns me the date time now. 
 
However, the users who will be using this dataflow are all based in the united states. 
 
How can i format this 
DateTime.LocalNow() to show as mm/dd/yyy hh:mm:ss 
Or, just to show as 14th Febuary 2024 10:01:22
 
Thanks 
1 ACCEPTED SOLUTION
katemarkoska
Frequent Visitor

Hi @PPStar 
You do not need to format anything. This function returns a datetime value set to the current date and time on the system.
So if the users are in the US and the region on their system is set to US it will automatically format as mm/dd/yyy hh:mm:ss.

View solution in original post

3 REPLIES 3
katemarkoska
Frequent Visitor

Hi @PPStar 
You do not need to format anything. This function returns a datetime value set to the current date and time on the system.
So if the users are in the US and the region on their system is set to US it will automatically format as mm/dd/yyy hh:mm:ss.

Thanks Kate. I just tested this and you are correct. Thank you. 

Idrissshatila
Super User
Super User

Hello @PPStar ,

 

check this video https://youtu.be/eH9dHfNG8kg?si=lWwD8RbJhb7Dxnv2

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.