I searched for this, and I’m sure it’s super basic, but I can’t find the solution here on the forum or in the LO help file.
I want to force a line break in the Custom Number Formatting so that this:
Fri 07/03/2025 14:30:00
becomes this:
Fri 07/03/2025
14:30:00.000
in a cell that needs to maintain it’s underlying number status for use in further calculations.
Any help is much appreciated.
Regards.
CT
Also textual DateTime values can be used in calculations if they have a format sufficiently close to the ISO 8601 standard. They are automatically converted then. Texts containing hard breaks or other fancy specialties are not eligible for this feature.
See example: disask119932_fancyDateTimeFotrmatting.ods (31.4 KB)
You need to include/concat CHAR(10), but as you can not call a function in a format, you should do the conversion outside of the format. But this will collide with your other condition “maintain it’s underlying number status”.
Workaround (fragile) allow the format to wrap lines and fill with additional spaces before the time, so LibreOffice will insert the line-break for you
I’m not aware of a way to use some hex-notation for LF in the format-codes and didn’t test if it can be included via special characters