View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
nastech nastech is offline
external usenet poster
 
Posts: 383
Default get HOUR check from NOW() cell

after some effort, came up with: (is there a shorter/ simpler way)

=IF((HOUR(TRIM(RIGHT(M9,11)))+1)HOUR(NOW()),1,0)

"Nastech" wrote:

hi, not good with date, times, cannot get out of help, want to test for cell
is x hours past cell that has been updated with NOW().

e.g.:
cell M9 with NOW(): 2008-05-27 2:00:00 AM

=IF(current time is 2 hoursM9,0,1)

would suggest help file have example how to manipulate NOW().
trying: =TRIM(LEFT(M9,SEARCH(" ",M9,12)))
gets a value error/ might make to big a formula.

would think easier way to manipulate this data. thanks