if between times
Posted: Thu Jul 19, 2007 9:27 am
Hi,
I am trying to figure out how one could determine what time of the day it would be (morning, afternoon or evening) when someone enters a time in a text field.
I know this is the incorrect way of doing it but it gives a clear example:
Any thoughts?
I am trying to figure out how one could determine what time of the day it would be (morning, afternoon or evening) when someone enters a time in a text field.
I know this is the incorrect way of doing it but it gives a clear example:
Code: Select all
if($sTime>=00:00:00 && $sTime<12:00:00)
{
$sTOD = "Morning";
}
elseif($sTime=>12:00:00 && $sTime<18:00:00)
{
$sTOD = "Afternoon";
}
elseif($sTime=>18:00:00 && $sTime<00:00:00)
{
$sTOD = "Evening";
}