Forum Discussion

JamesT23's avatar
JamesT23
Frequent Visitor
7 years ago
Solved

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 

  • 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

  • JamesT23 you can call both function in each other

    DateTime.ToText(Date.AddMonth(<syntax to add months>))
    • JamesT23's avatar
      JamesT23
      Frequent Visitor

      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. 

      • parry2k's avatar
        parry2k
        Icon for Super User rankSuper User

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