ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   time comparisons with now() (https://www.excelbanter.com/excel-programming/396613-time-comparisons-now.html)

Robert

time comparisons with now()
 
Dear all,

I hope this message finds you enjoying your day. I'm having some trouble
comparing time with the now() function.

Normally, if I type in

=9:00 AM 10:00 AM

The result will be "false." This is the type of comparison that I want.

However, it seems as though comparing time produced by the now() function
works a bit differently. Can somebody explain how to compare time produced
by the now() function?

Thanks and have a nice day.

Ray

time comparisons with now()
 
Hi robert -

I think the problem is that NOW() gives the following result:
8/30/2007 10:31:55 AM (example)

Try TIME() instead ....

ray



joel

time comparisons with now()
 
Now function is the number of days from 1/1/1900 which is alwasy greater than
one. 1/2/1900 - 1/1/1900 = 1.. Time is a fraction of a day always less than
one where 0 is midnight. 8 hours is equal to 8/24.

"robert" wrote:

Dear all,

I hope this message finds you enjoying your day. I'm having some trouble
comparing time with the now() function.

Normally, if I type in

=9:00 AM 10:00 AM

The result will be "false." This is the type of comparison that I want.

However, it seems as though comparing time produced by the now() function
works a bit differently. Can somebody explain how to compare time produced
by the now() function?

Thanks and have a nice day.



All times are GMT +1. The time now is 07:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com