Forum Discussion

Jiro's avatar
Jiro
Frequent Visitor
2 years ago
Solved

Date into Text Strings

Hi all,

 

I am trying to convert below values (data type: date) into text. 

 

Example in MMddYYYY formatting:

12/30/2023

01/08/2022

07/15/2023

 

Convert to text strings: *keeping only year and month* so expected result should look like below

 

202312

202201

202307

 

Is there anyone who can help me with m code?

2 Replies

  • Hi, Jiro use Date.ToText(value, [Format = "yyyyMM"])

    • Jiro's avatar
      Jiro
      Frequent Visitor

      Thank you AlienSx !

       

      I tested with:

      Date.ToText([column], "yyyyMM") and it works!