Ask Your Question
0

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

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

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

Comments

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 +0100 )edit

2 Answers

Sort by » oldest newest most voted
2

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

Mike Kaganski gravatar image

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
0

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

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

Stats

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

Seen: 45 times

Last updated: Dec 09 '18