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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
webportal
Impactful Individual
Impactful Individual

Add one hour to date/time column

How to add one hour to column Value below?

webportal_0-1685525094631.png

 

This is my custom step:

webportal_1-1685525138589.png

 

 

No matter what the second argument of the function is, nothing happens....

1 ACCEPTED SOLUTION
aggiebrown
Helper III
Helper III

hi @webportal 

 

it's best to add UTC Time Zone, and then use "DateTimeZone.SwitchZone" function of Power Query to swap to whichever time zone you want to use.

I used UTC and CEST as example. You can look up the time zones on this website (it also tells you the time difference which you will need to use to set up your parameter): https://www.timeanddate.com/worldclock/

 

 

Adding UTC Column would look like this:

Screenshot 2023-05-31 103903.jpg

 

From then on you need to create Parameter with however many hours the time difference will be and use the parameter to switch time zones like so:

aggiebrown_1-1685526040407.png

 

aggiebrown_0-1685526016403.png

Create another custom column to switch time zones using your required parameter and delete any columns you no longer need in the next step (UTC column for example)

aggiebrown_2-1685526094490.png

End result looks like this:

aggiebrown_3-1685526209223.png

 

View solution in original post

2 REPLIES 2
aggiebrown
Helper III
Helper III

hi @webportal 

 

it's best to add UTC Time Zone, and then use "DateTimeZone.SwitchZone" function of Power Query to swap to whichever time zone you want to use.

I used UTC and CEST as example. You can look up the time zones on this website (it also tells you the time difference which you will need to use to set up your parameter): https://www.timeanddate.com/worldclock/

 

 

Adding UTC Column would look like this:

Screenshot 2023-05-31 103903.jpg

 

From then on you need to create Parameter with however many hours the time difference will be and use the parameter to switch time zones like so:

aggiebrown_1-1685526040407.png

 

aggiebrown_0-1685526016403.png

Create another custom column to switch time zones using your required parameter and delete any columns you no longer need in the next step (UTC column for example)

aggiebrown_2-1685526094490.png

End result looks like this:

aggiebrown_3-1685526209223.png

 

Ahmedx
Super User
Super User

pls try this

DateTime.From(Number.From(Value) + Number.From(#time(1,0,0)))
-----------or-------------------
DateTime.From(Text.From(Value)&" "&Text.From(#time(1,0,0)))
------------or----------------
DateTime.From(Text.From(Value)&" "&Time.ToText(#time(1,0,0),"hh:mm:ss"))

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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