Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Time Field with "Outlier" if null

Status
Not open for further replies.

nuttyernurse

Technical User
May 18, 2009
35
US
Hello all!

I am working with a date/time field in access, pulling to crystal 11. The data in the field is either a date like "11/23/2009 10:40" or the word "outlier" if it was not entered. My problem is how to convert the fields with a date present into an actual date (to do datediff calcs with another field) but leave the "outlier" alone as I have to measure the number of outliers. I have tried to use

DateTimeValue ({RightBed.Initial Discharge Status})

on the field, but it tells me "Bad date format"

How would I go about this?

Thank you in advance!
 
I figured it out, might be clunky, but it works:

if {RightBed.Final Discharge Status}<>"outlier"
then CDateTime({RightBed.Final Discharge Status})
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top