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
WilmaB
New Member

Converting date formats

I received a .csv file and the date format in the file is:

 

2015-05-11-02.59.58.878520

 

When I import the data into Power BI, it imports the date as a string and all attempts at converting this string to a date format has failed.  I added a new column and used both these formulas

 =DATEVALUE("2015-01-26-02.59.33.625380") 

Measure = DATEVALUE(LEFT("2015-01-26 02.59.33.625380",10)) 

 

Please help?  I need all the decimals as I am doing a SLA analysis where I need to calculate the time lapsed between records.

 

Thanks so much in advance

 

1 ACCEPTED SOLUTION
BhaveshPatel
Community Champion
Community Champion

Go to Query Editor, Split Column by delimiter as shown in the screenshot.

Split by DelimiterSplit by Delimiter

 

 

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

View solution in original post

5 REPLIES 5
DennisJung
Helper I
Helper I

sd

v-yulgu-msft
Employee
Employee

Hi, @WilmaB

 

According to your decsription, you want to import the date which is accurate to the millisecond into PowerBI, right? However, this kind of data type is not supported in PowerBI. The data in Date/Time format should be like  "5/11/2015 2:59:58 AM". So, your requirement cannot be achieved currently.

 

Thanks,
Yuliana Gu

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

Thank you Yuliana!

BhaveshPatel
Community Champion
Community Champion

Go to Query Editor, Split Column by delimiter as shown in the screenshot.

Split by DelimiterSplit by Delimiter

 

 

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Thank you. I managed to convert the date but it was much easier to do in SQL and then import. The solution did work though, thanks for the help!

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.