Custom 12hour time format without AM/PM

I want to display time in 12 hour format in Calc but without AM/PM suffix, how can I do that? Want to display only hours without minutes/seconds.

I see good suggestions but I want to directly enter time in above mentioned way using Ctrl+; key combination, I was hoping for a time format for that.

Not formatting but with an additional cell,=IF(A2*24>=13,INT(A2*24)-12,INT(A2*24))

Or maybe use MOD(HOUR(...),12) - but yours allows to show 12 for noon.

1 Like

But not 00:00:00 to 00:59:59 which shows 0 instead of 12, correction:
=IFS(A2*24>=13,INT(A2*24)-12,A2*24<1,12,A2*24<13,INT(A2*24))

If both 0 and 12 must show 12 (sorry, I am not familiar with that 12-hour format), then here’s yet another option:

=MOD(HOUR(B1);12)+(CURRENT()=0)*12
1 Like

Excel compatible: :slightly_smiling_face:

=MOD(HOUR(B1)-1;12)+1
3 Likes

Thanks, I want to directly enter time in above mentioned way using Ctrl+; key combination, I was hoping for a time format for that.

You can enter the date with Ctrl+; and in the cell next to it (or somewhere else) you have the formula which does the conversion.
TimeToClockHours.ods (14.1 KB)
There isn’t a time format without defining what part of the day it is.