Ask Your Question

How to enter time in 4 digit (not 6 digit) format?

asked 2018-12-09 11:29:15 +0200

lesbentley gravatar image

I enter a time such as "19:10", which is correct, Calc then converts the time to "19:10:00". The time is now erroneous. The time should be 19:10. There should be NO seconds after the minutes, the seconds MUST remain unspecified, otherwise the data can not be validated as correct.

edit retag flag offensive close merge delete


A recognised time value is a number. How does your validation distinguish between twice the same number?

Lupp gravatar imageLupp ( 2018-12-09 23:05:21 +0200 )edit

2 Answers

Sort by » oldest newest most voted

answered 2018-12-09 11:51:57 +0200

In LibreOffice, there's no way to store data in a date/time format with some parts unspecified. They will always have some value, even if 0. You can avoid showing it, but it will still be there.

You may also choose to store data in textual format (to do that, you need to format cells as text before entering the data, or prepend your data with ').

But you didn't tell what "validation" you are talking about; so possibly you just need to change the validation procedure instead. E.g., you might want to compare not the times in cells, but formulas like =TIME(HOUR(B2);MINUTE(B2);0)=TIME(HOUR(C2);MINUTE(C2);0).

edit flag offensive delete link more

answered 2018-12-09 22:47:44 +0200

erAck gravatar image

Stored is the numeric value for 19:10, but the default display format for time is HH:MM:SS, if you don't want seconds to be displayed then apply the number format HH:MM to the cell, use Ctrl+1 or menu Format -> Cells...

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-12-09 11:29:15 +0200

Seen: 53 times

Last updated: Dec 09 '18