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.

Bug: FORMAT function formatting mm:ss incorrectly

The formatting of datetime in Power BI doesn't work if you only use mm:ss.  Power BI will format the value as if it was MM:ss displaying Month then seconds.  If I use an hour indicator, then Power BI will recongnize the lowercase mm as minutes.

 

MyMeasure:=TIME(0, 0, 195.6) 

Has a value of "12/30/1899 12:03:16 AM"

 

TestFormat:=FORMAT([MyMeasure], "mm:ss")

Has a displayed value of 12:16 which is actually December and 16 seconds.  If I used mmm:ss, I get Dec:16.

 

TestFormat:=FORMAT([MyMeasure], "hh:mm:ss")

Has a displayed value of 00:03:16, but this is actually wrong because my hh indicates a 12-hour clock and should read 12:03:16.  For some reason it treats the hh as HH.

 

 

Status: New
Comments
v-jiascu-msft
Employee

Hi @behonji,

 

Though the Format specifications (the letters) have some meaning, we still need to provide a correct format. Or it could return unexpected result.

1. "mm:ss" isn't a valid time format. It could be a duration. We can omit the Second part in a time while we can't omit the Hour part. I would say it's 16 minutes past 3 if I get a value "03:16".

2. The correct format of 12-hour clock is something like this: "hh:mm:ss AM/PM".

FORMAT_function_formatting_mmss_incorrectly

 

Best Regards,

Dale

behonji
Regular Visitor
Hi @v-jiascu-msft, I realize that 03:16 looks like 16 minutes past 3 AM to a person that doesn't have context of the report being used. But, the report is a call center report and they are wanting to see the average phone call. Nothing is greater than 10 minutes. They don't want to see hours (00:03:16) because it just fills up the report with distracting information and makes it hard to read. They know they are looking at minutes:seconds. This is no different than a financial statement that says 'in thousands" or "in millions" in the header. Every report has context. All the above aside, mm:ss shouldn't return month : seconds. To support your argument, it should at least return mm:16 to indicate that the mm is not recognized as a valid format.
davorgom
Frequent Visitor

 Hi @v-jiascu-msft

 

How are you? I wanna know if you can help me. I need to analyse timing records for athletics, but I have problems with the format. I have to work with  hundredth second (mm:ss.00). For example a result from 100m is 9.82sg. Do I know how can I work with it?

 

I appreciate your collaboration. 

 

Best regards