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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
breitgo
Regular Visitor

DateTime Conversion

Dear all,

 

maybe you can point me to the right answer:

In an import file I have a column with date-time data. Format is YYYYMMDDHHMM (as text). E.g. 201801031403

 

My challenges:

I need two columns - one with data, one with time - which I later can use for filter & navigation

  • Column split did work (split after the 8th digit "20180103")
  • Formatted date column as date - worked as well
  • 2nd column is the time column - here the formatting does not work at all. 

What am I doing wrong??? Or is there any smarter solution?

 

Cheers

Christian

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@breitgo,

Please check detailed steps in the PBIX file below about how to get time part from the column and convert it to Time.

https://1drv.ms/u/s!AhsotbnGu1NolB_GPuXRV5NCay0r


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi Christian,

Data Type : Time has specific formats.

Hour, Minutes and Seconds are seperated my colon.

 

SGPhoto_2018_07_14 12_04_44.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

So, I suggest split 2nd column after 2nd digit so it gives you seperate Hour and Minute values. Add custom column to concatenate them with colon in between Or merge columns using colon seperator. Change Data Type to Time.

v-yuezhe-msft
Employee
Employee

@breitgo,

Please check detailed steps in the PBIX file below about how to get time part from the column and convert it to Time.

https://1drv.ms/u/s!AhsotbnGu1NolB_GPuXRV5NCay0r


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.