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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Change Data Type for XX:XX.X

I have a .csv that has a date in the format XX:XX.X.  for this example its 13:13.7 is in the text box.  when you look in the formula bar it shows 12/28/2020 3:13:14 AM. (I need the Date only).  In Power Bi it has the data type as text and has a value of 13:13.7.  When I change it to Date Type is causes an error.

 

DataFormat.Error: We couldn't parse the input provided as a Date value.
Details:
13:13.7

Status: New
Comments
v-yingjl
Community Support

Hi @Anonymous ,

To my knowledge, powe query could not distinguish the type xx:xx.x from .csv format but can distinguish xx:xx type, you can use the delimiter '.' to split the field when importing data into power query.

time.png

However, in this way you can only get the time not the date, seems that the type in the formula bar shows today's date and the time value so you want to get today's date?

If so, you can create a custom column like this to get date:

= Date.From(DateTime.LocalNow())

date.png

 

Best Regards,
Community Support Team _ Yingjie Li