View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom[_2_] Peo Sjoblom[_2_] is offline
external usenet poster
 
Posts: 964
Default what is the time of the day

=IF(MOD(NOW(),1)<--"17:00","Before 5",HOUR(NOW()))

you need to press F9 to update the formula

--


Regards,


Peo Sjoblom

"tomas" wrote in message
...
I need a formula that will tell me the time of the day. i have a field
with
the date and time (mm/dd/yy hh:mm PM). I need the formula to return the
hour
of the day if the hour is after 5PM. For example, if it is 11/29/08 5:23
PM
i want it to return "5". If it is 11/27/08 6:46 PM, i want it to return
"6".
For anything before 5PM, i want it to return "before 5".
Thanks.