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
Anonymous
Not applicable

Cannot convert column value to custom column and set type to time

Hi all,

 

 I have what appears to be unix epoch time in ms (I think). I tried creating a custom column with 

#datetime(1970, 1, 1, 0, 0, 0) + #duration(0, 0, 0, [UnixTime]/1000)

however that does not work and results in Error values

 

If I use this instead

#datetime(1970, 1, 1, 0, 0, 0) + #duration(0, 0, 0, 1410907851)

 

I do get results but are the same date and time in 2014. What am I missing here?

 

 

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

#duration(0, 0, 0, 1410907851) means 1410907851 seconds,  when you add 1410907851 seconds to the date 1970/1/1, it will get 2014 by default.

 

Please show me which result do you want, i can test and find the solution for you.

 

Best Regards
Maggie

 

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

Anonymous
Not applicable

@Maggie  @v-juanli-msft  I think this format is actually in epoch ms time but for some reason this resulted in an error when I applied it.

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.