Forum Discussion
Query changes
- 9 years ago
Hi Pucca121,
Select 'Edit Queries' from arrow down.
Open your power query code via clicking on 'Advanced Editor'
In your code, you just need to add the highlighted part. You should replace the #"Changed Type" and "Date" with your own scenario.
Regards,
Yuliana Gu - 9 years ago
There are many ways to change the hour. What would be the desired result?
The solution may depend on wether any time zones are involved or not.
- Pucca1219 years agoHelper II
Only one time zone is involved. I would like to put it at 00:01:00 (one minute past midnignt)
Thank you
P.
- MarcelBeug9 years agoCommunity Champion
In the query editor (M) you can add a duration of 1 hour and 1 minute, e.g. with the following code, in which "PreviousStep" is the name of your previous step in the query code:
= Table.TransformColumns(PreviousStep,{{"DateTime", each _ + #duration(0,1,1,0), type datetime}})- Pucca1219 years agoHelper II
Hello MarcelBeug
Where do I put this code? And I don't understand what is my PreviousStep.
I never did this type of tranformation in the query editor.
Thank you so much for your help!
P.
- v-yulgu-msft9 years agoMicrosoft Employee
Hi Pucca121,
As MarcelBeug suggested, this query code works fine in my test, I could get the desired result. If it also apply to your scenario, please kindly mark it as an answer so that someone else having similar requirement can find the solution more easily. If not, please feel free to ask.
Regards,
Yuliana Gu