24 hour date/time conversion issue
Posted: Tue Oct 31, 2006 12:45 pm
i'm trying to do a 24hr date conversion here using PHP and something just struck me....
is 12 midnight 12 am or is 12 noon 12 pm?
I'm trying to work out a code where i have a drop down lis of the hours 1- 12 and minutes 0 - 59
and i have php snippet where
now this is to be entered into a date time mysql datatype column that has 0-23
a 24hr time would give me 00:00:00 in my database entry.
so my question is...what is the correct calculations to use?
Kendall
is 12 midnight 12 am or is 12 noon 12 pm?
I'm trying to work out a code where i have a drop down lis of the hours 1- 12 and minutes 0 - 59
and i have php snippet where
Code: Select all
if($t == 'pm'){
$hour = 12+$hour;
}
a 24hr time would give me 00:00:00 in my database entry.
so my question is...what is the correct calculations to use?
Kendall