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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
susheeltyagi
Helper I
Helper I

How to format Timestamp

Hi

 

I am new in Power BI. I need to format the Datetime from "2021-03-19T09:28:52.8090000Z" to  "dd-MM-yyyy HH:mm:ss".

I am trying with below statemet but I am getting error

 

IngressTimestamp

2021-03-19T09:29:10.5510000Z

 

= DateTime.ToText([IngressTimestamp],"dd-MM-yyyy HH:mm:ss")

 

Error :

 

Expression.Error: We cannot convert the value "2021-03-19T09:28:52...." to type DateTime.
Details:
Value=2021-03-19T09:28:52.8090000Z
Type=[Type]

 

 

1 ACCEPTED SOLUTION

@susheeltyagi 

 

If you are not going to make any timezone conversion I suggest you replace letter 'T' with space ' ' and also replace Z with nothing ''

You can do this by doing right click on column heading --> Replace values

First replace T with space ' ' (Press space once in 'Replace With' Box)

Second replace Z with nothing (Do not put anythin on 'Replace With' box)

 

Finally right click on column heading again --> Change Type to Date/Time

View solution in original post

5 REPLIES 5
HarishKM
Memorable Member
Memorable Member

@susheeltyagi You can create a new column . you can use below dax function 

Time Stamp 1 = FORMAT(Sheet1[Time Stamp],"dd:mm:yyyy hh:mm:ss")

Give me kudos if find it useful .


amitchandak
Super User
Super User

@susheeltyagi , first of all, you should make the column IngressTimestamp is DateTime. if not change it datetime and then try this new column

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks for quick reply. BUt I am sorry how to make the column IngressTimestamp "2021-03-19T09:28:52.8090000Z" is DateTime ? I can create the new Custom Column but what the formulla ?

@susheeltyagi 

 

If you are not going to make any timezone conversion I suggest you replace letter 'T' with space ' ' and also replace Z with nothing ''

You can do this by doing right click on column heading --> Replace values

First replace T with space ' ' (Press space once in 'Replace With' Box)

Second replace Z with nothing (Do not put anythin on 'Replace With' box)

 

Finally right click on column heading again --> Change Type to Date/Time

Thanks dear its working now.. Great!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.