Forum Discussion

bouyazbekj's avatar
bouyazbekj
Helper I
7 years ago
Solved

Convert date from YYYYMMDDHHMM to HH:MM

Hello,

 

I have a date in form of text that I'd like to turn into hours and minutes only. (HH:MM)

 

Example 

 

201904151015 to 10:15

 

Any idea how to do this? 

 

  • bouyazbekj if it is datetime field then you can use format

     

     MyTime = FORMAT( Table[Your Date Time Column], "HH:MM" )

3 Replies

  • bouyazbekj if it is datetime field then you can use format

     

     MyTime = FORMAT( Table[Your Date Time Column], "HH:MM" )
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,

       

      So, you're saying it's a text column? Well, I'd do it in Power Query. I'd go to Transform > Split Column > By Number of Characters. Choose 8 characters. Then in the split column that has the hours and minutes part as "1015", just change the type to time.