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
Justas4478
Post Patron
Post Patron

Converting timestamp to date and time using measure

Hi, I am trying to convert timestamp that is wholenumber in to date and time or at least date.
I tried to createa measure using FORMAT but it failed.
I can't use calculated column because I am using company data model.
anyone would be able to help with this measure?

Justas4478_0-1706532795784.png 
Thanks.

 

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hi @Justas4478 

try

Measure = 
var _d = MIN(Table[LatestTimestamp])

RETURN

DATE(LEFT(_d, 4), MID(_d, 5, 2), MID(_d, 7, 2)) & " " & TIME(MID(_d, 9, 2), MID(_d, 11, 2), RIGHT(_d, 2))

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

2 REPLIES 2
az38
Community Champion
Community Champion

Hi @Justas4478 

try

Measure = 
var _d = MIN(Table[LatestTimestamp])

RETURN

DATE(LEFT(_d, 4), MID(_d, 5, 2), MID(_d, 7, 2)) & " " & TIME(MID(_d, 9, 2), MID(_d, 11, 2), RIGHT(_d, 2))

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

@az38 It worked thank you.

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.