cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JamesT23 Frequent Visitor
Frequent Visitor

Combining power query to change dates

Hi 

 

I want to use PowerQuery to add 11 months to my date and change the format. I can do both individaully using Date.AddMonths and DateTime.ToText but not together. Can someone explain to me how to join the two together.

 

Thanks 

 

James 

1 ACCEPTED SOLUTION

Accepted Solutions
JamesT23 Frequent Visitor
Frequent Visitor

Re: Combining power query to change dates

Turns out I actually had it correct in the first place, the mistake I made was using DateTime.ToText when i needed to run Date.ToText. Looks like the two had to match. 

3 REPLIES 3
Super User
Super User

Re: Combining power query to change dates

@JamesT23 you can call both function in each other

DateTime.ToText(Date.AddMonth(<syntax to add months>))




Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Kudos Help Smiley Happy
Connect with me on Linkedin. Feel free to email me with any of your BI needs.




 




JamesT23 Frequent Visitor
Frequent Visitor

Re: Combining power query to change dates

Turns out I actually had it correct in the first place, the mistake I made was using DateTime.ToText when i needed to run Date.ToText. Looks like the two had to match. 

Super User
Super User

Re: Combining power query to change dates

@JamesT23 yes you are right, both has to match. I missed that too. I guess issue is resolved though.





Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Kudos Help Smiley Happy
Connect with me on Linkedin. Feel free to email me with any of your BI needs.