Bug 106240 - Formatting time does not accept M or MM as minutes
Summary: Formatting time does not accept M or MM as minutes
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2.5.1 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-28 19:28 UTC by Jerzy Moruś
Modified: 2017-03-07 10:44 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example of formatting time (11.10 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-03-01 14:17 UTC, Jerzy Moruś
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jerzy Moruś 2017-02-28 19:28:31 UTC
There is a problem with the code formatting for time. Format in the form HH: MM: SS shows the time represented by the variable. You can use the code H or HH for presenting exclusively hour, S or SS to represent exclusively seconds. You can not use the code M and MM for the presentation minutes because it is regarded as a code representing months. Using the code [MM] is interpreted correctly and shows the total time in minutes.
Comment 1 Xisco Faulí 2017-03-01 10:24:32 UTC Comment hidden (obsolete)
Comment 2 Jerzy Moruś 2017-03-01 14:17:37 UTC
Created attachment 131557 [details]
Example of formatting time
Comment 3 Buovjaga 2017-03-04 18:29:31 UTC
I don't understand why this is a problem. I am sure there is some interoperability/compatibility reason behind this.
https://help.libreoffice.org/Common/Number_Format_Codes

Closing as not a bug.
Comment 4 Jerzy Moruś 2017-03-05 11:27:24 UTC
Contrary to what you write, it is a problem.
The idea of formatting cells containing the date and time for the possibility to show only one component of the date or time. Just then enter the code of the item. For example, HH for hours for the day DD, YY for the year. M code is assigned to the month - when it comes to the date and the minute - when it comes to time. In this situation, you use it when you format is ambiguous and Calc always interprets it as a month.
Example. I gained some measurements recorded data in the system; YYYY.MM.DD HH:MM:SS. I want to show them providing minute of the first to the last measurement.
The first and last measurement Formatting YYYY.MM.DD HH:MM and all intermediate as MM. I can not do because Calc interprets the code as a month instead of minutes.
To reach your goal must use the function MINUTE(arg).
In Finland, this problem can not be because the code for the month is K.
Comment 5 Buovjaga 2017-03-05 12:09:15 UTC
Eike: was I wrong to close this as NOTABUG?
Comment 6 Eike Rathke 2017-03-07 10:44:09 UTC
Using M or MM standalone is formatting month, same as in Excel. Use [M] or [MM] if you want minutes duration (which even displays values >59).