get HOUR check from NOW() cell

  • Thread starter Thread starter Nastech
  • Start date Start date
N

Nastech

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 hours>M9,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
 
after some effort, came up with: (is there a shorter/ simpler way)

=IF((HOUR(TRIM(RIGHT(M9,11)))+1)>HOUR(NOW()),1,0)
 
example need to work getting longer.. must be a shorter way:
IF(OR(IF(M9>0,(HOUR(TRIM(RIGHT(M9,11)))+$C$6)<HOUR(NOW()),TRUE)),0,1)

still off by 59 mins..
 
thanks! works great for minutes away. only difference is that am using 0 as
null/false condition.. or =IF(24*(NOW()-M9)>2,0,1)

in example if date present in m9
=IF(OR(IF(M9>0,24*(NOW()-M9)>$M$6,TRUE)),0,1)

think tried to get this couple times, way back, never could get answer/
didn't know how to ask, was a major problem. could not figure from now()
help. not much there. thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top