Need to comapre a time

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

I need a comparison within an iif statement to identify a time value of
00:00:00 and don't know what to enclose the time in, have tried

'00:00:00'

"00:00:00"

"#00:00:00#"

Thought I had better ask!! ;-)

Regards.
Bill.
 
Normally just
IIF([SomeTimeField] = #00:00:00#, returnx, returny)

Or even
IIF([SomeTimeField]=0,...

If you are checking a field with both time and date components you will need
to do something different. In Access (with Jet) you can use the following

IIF(CLng(SomeTimeField)=CDbl(SomeTimeField), ...


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top