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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.