Forum Discussion
timestamp custom format for milliseconds not working
Hi all
I have a timestamp with precission of milliseconds even nanoseconds and in powerbi desktop this custom format is not working
dd/MM/yyyy hh:mm:ss.fff
also tried with
dd/MM/yyyy hh:mm:ss.000
However in Power Query I can generate a text field including milliseconds with this M code
DateTime.ToText([TradeTimestamp], [Format = "yyyy-MMM-dd HH:mm:ss:fff", Culture = ""])
Thanks
Hi dpombal ,
Create a duplicate column(TradeTimestamp-copy) in power query and convert it into Text.
Then in Table visual ,use the TradeTimestamp-copy for table visual.For sorting TradeTimestamp-copy column use original TradeTimestamp column.
Please give Kudos or mark it as solution once confirmed.
Thanks and Regards,
Praful
7 Replies
- Praful_Potphode
Super User
Hi dpombal ,
Create a duplicate column(TradeTimestamp-copy) in power query and convert it into Text.
Then in Table visual ,use the TradeTimestamp-copy for table visual.For sorting TradeTimestamp-copy column use original TradeTimestamp column.
Please give Kudos or mark it as solution once confirmed.
Thanks and Regards,
Praful
- dpombal
Post Partisan
for sorting do you use the original timestamp or the number column you create?
- lbendlin
Super User
Use a decimal field instead, or (the preferred option) split your column into three parts - date, time, and milliseconds.
- Kedar_Pande
Super User
Power BI's default Date/Time formatting does not support milliseconds (fff) in the visual formatting pane. To display milliseconds, you need to convert the datetime to text with milliseconds included.
DateTime.ToText([TradeTimestamp], "dd/MM/yyyy HH:mm:ss.fff", "en-US")
Then use this new text column in your report visuals.
If this answer helped, please click Kudos or mark as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande