Forum Discussion

cwfmoore's avatar
cwfmoore
Regular Visitor
3 years ago
Solved

Convert a [MONTH and [YEAR] column to a DATE.

Hi,

 

I have a csv document with a [MONTH] and [YEAR] column as shown. I would like to comine these two into a date column making it eg: 01/08/2022 for each entry.

 

Kindest regards.

 

  • =Table.AddColumn(PreviousStepName,each Date.From(Text.Format("#[year]-#[month]-1",_)))

  • KNP's avatar
    KNP
    3 years ago

    Paste this portion in...

    Date.From(Text.Format("#[year]-#[month]-1",_))

     

    If this solves your problem, please accept wdx223_Daniel's answer above as the solution. Not this one. 

     

3 Replies

  • wdx223_Daniel's avatar
    wdx223_Daniel
    Icon for Community Champion rankCommunity Champion

    =Table.AddColumn(PreviousStepName,each Date.From(Text.Format("#[year]-#[month]-1",_)))

    • cwfmoore's avatar
      cwfmoore
      Regular Visitor

      Forgive my amatuer-ish-ness but how would you complete that without the advanced editor?  In this interface?

       

       

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

        Paste this portion in...

        Date.From(Text.Format("#[year]-#[month]-1",_))

         

        If this solves your problem, please accept wdx223_Daniel's answer above as the solution. Not this one.