time formatting
Posted: Fri Apr 15, 2005 4:55 am
Hi all,
I have in a database times displayed like
"2:30 to 4:30"
"10:00 to 12:00"
all these times are daytime times and i need to manipulate the data so that i can represent the above into start and end times in 24 hour. so the above would be presented as:
start time
14:30
10:00
end time
16:30
12:00
How can i do this. I tried the following to represent 2:30 and it displays 02:30 and not 14:30:
any ideas how i can achieve this?
I have in a database times displayed like
"2:30 to 4:30"
"10:00 to 12:00"
all these times are daytime times and i need to manipulate the data so that i can represent the above into start and end times in 24 hour. so the above would be presented as:
start time
14:30
10:00
end time
16:30
12:00
How can i do this. I tried the following to represent 2:30 and it displays 02:30 and not 14:30:
Code: Select all
<?php
$timedd = "e;2:30"e;;
echo date("e;H:i"e;, strtotime($timedd));
?>