Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
ZMadarasi
New Member

Convert Stuctured Text to DateTime

Hello,

Do you have experience

  with Text Columns like "250605_063623" where "YYmmdd_HHMMSS" to

  make it Datetime Column "2025.06.05. 6:36:23"?

BR,

Thanks,

Zoltán

1 ACCEPTED SOLUTION
miTutorials
Super User
Super User

 Add Custom Column in the Power Query Editor and use the below code..

 

= DateTime.FromText(
       Text.Middle([YourColumn],  4,  2)  & "/"  &  
       Text.Middle([YourColumn],  2, 2)  &  "/"  & 
       "20"  &  Text.Start([YourColumn],  2) &  "  "  & 
       Text.Middle([YourColumn],  7,  2)  & ":"  &  
       Text.Middle([YourColumn],  9, 2)  &  ":"  & 
       Text.End([YourColumn],  2)
)

 

 

View solution in original post

3 REPLIES 3
ZMadarasi
New Member

Thanks for the quick solution. It works 🙂

BR

Zoltán

v-pnaroju-msft
Community Support
Community Support

Thankyou, @miTutorials, for your response.

Hi ZMadarasi,

We appreciate your inquiry posted on the Microsoft Fabric Community Forum.

Please find attached the screenshot and the PBIX file, which may assist in resolving the issue:

vpnarojumsft_0-1750222888660.png

If our response proves helpful, we kindly request you to mark it as the accepted solution and provide kudos. This will benefit other community members who may have similar queries.

Should you have any further questions, please feel free to reach out to the Microsoft Fabric Community.

Thank you.

miTutorials
Super User
Super User

 Add Custom Column in the Power Query Editor and use the below code..

 

= DateTime.FromText(
       Text.Middle([YourColumn],  4,  2)  & "/"  &  
       Text.Middle([YourColumn],  2, 2)  &  "/"  & 
       "20"  &  Text.Start([YourColumn],  2) &  "  "  & 
       Text.Middle([YourColumn],  7,  2)  & ":"  &  
       Text.Middle([YourColumn],  9, 2)  &  ":"  & 
       Text.End([YourColumn],  2)
)

 

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.