time part

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If I have a datetime expression such as Format(ApptStart, "hh:nn") and
ApptStart is null, what is the result of that expression? Formerly I could
test for IsNull(ApptStart) but with the formatting, null is never true. I
thought it might evaluate to zero but that does not appear to be the case.
 
smk23 said:
If I have a datetime expression such as Format(ApptStart, "hh:nn") and
ApptStart is null, what is the result of that expression? Formerly I could
test for IsNull(ApptStart) but with the formatting, null is never true. I
thought it might evaluate to zero but that does not appear to be the case.


Check for a ZLS, i.e. ""
 
The result will be a Zero Length String. If AppStart is Null and you want
the expression to return 00:00 Then add this:
Format(Nz(ApptStart,0), "hh:nn")
 
Back
Top