Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
NOW() function
not seeing what missing, trying to make the following:
=AND(NOW()"16:00",$DR$3<"16:00") where Now()"16:00" seems to return the opposite of the actual time. if 17:00 is the time, I get a FALSE. is there an error in my example? thanks |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
NOW() function
NOW() returns both the date (as the integer part) and time (as the
fractional part), so unless your system clock is set to 12/31/1899 (or 1/1/1904 in the 1904 system), NOW() will *always* return a value "16:00" (which gets converted to 0.666666666666667, since 16:00 is 2/3 of 1 day). Perhaps: =AND(MOD(NOW(),1)TIME(16,0,0), $DR$3<TIME(16,0,0)) which strips off the date part of NOW() will work for you. In article , nastech wrote: not seeing what missing, trying to make the following: =AND(NOW()"16:00",$DR$3<"16:00") where Now()"16:00" seems to return the opposite of the actual time. if 17:00 is the time, I get a FALSE. is there an error in my example? thanks |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
NOW() function
thanks, works fine.. mod's been funny to get, divide by 1 leaves the 2nd
half? "JE McGimpsey" wrote: NOW() returns both the date (as the integer part) and time (as the fractional part), so unless your system clock is set to 12/31/1899 (or 1/1/1904 in the 1904 system), NOW() will *always* return a value "16:00" (which gets converted to 0.666666666666667, since 16:00 is 2/3 of 1 day). Perhaps: =AND(MOD(NOW(),1)TIME(16,0,0), $DR$3<TIME(16,0,0)) which strips off the date part of NOW() will work for you. In article , nastech wrote: not seeing what missing, trying to make the following: =AND(NOW()"16:00",$DR$3<"16:00") where Now()"16:00" seems to return the opposite of the actual time. if 17:00 is the time, I get a FALSE. is there an error in my example? thanks |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
NOW() function
As you say, NOW() will always be greater than 16:00, so the reason that the
OP was getting FALSE is that the quotes around the times make them text strings. If you use double unary minus, that will convert them back to times [as an alternative to using the TIME() function], so try =AND(MOD(NOW(),1)--"16:00",$DR$3<--"16:00") -- David Biddulph "JE McGimpsey" wrote in message ... NOW() returns both the date (as the integer part) and time (as the fractional part), so unless your system clock is set to 12/31/1899 (or 1/1/1904 in the 1904 system), NOW() will *always* return a value "16:00" (which gets converted to 0.666666666666667, since 16:00 is 2/3 of 1 day). Perhaps: =AND(MOD(NOW(),1)TIME(16,0,0), $DR$3<TIME(16,0,0)) which strips off the date part of NOW() will work for you. In article , nastech wrote: not seeing what missing, trying to make the following: =AND(NOW()"16:00",$DR$3<"16:00") where Now()"16:00" seems to return the opposite of the actual time. if 17:00 is the time, I get a FALSE. is there an error in my example? thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do you write format results of a function within a function? | Excel Worksheet Functions | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Offset function with nested match function not finding host ss. | Excel Worksheet Functions | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions | |||
Nested IF Function, Date Comparing, and NetworkDays Function | Excel Worksheet Functions |