HowardHammerman
Instructor
My client's database has a table of work tickets with four fields:
Startdate (datetime but the time portion is all zeros)
Starttime (Eight-character string field format hh:mm:ss)
Enddate (same format as startdate)
Endtime (same format as starttime)
I created a datetime variable in a formula as follows:
dateTimeVar xx := DateTimeValue (date({timesheet.startdate},timevalue({timesheet.starttime} );
This seemed to work for many records but then I got an error message, "Bad time value".
I scanned the records in a separate report and could not find anything wrong.
I solved the problem by converting the hours, minutes and seconds to numbers and then converting those variable to time.
QUESTION: Is there a way of traping bad data? Does crystal have the equivalent of "on error"?
Thanks in advance.
Howard Hammerman,
Crystal Training and Crystal Material
On-site classes and one-on-one coaching
Low-cost telephone/email support
Startdate (datetime but the time portion is all zeros)
Starttime (Eight-character string field format hh:mm:ss)
Enddate (same format as startdate)
Endtime (same format as starttime)
I created a datetime variable in a formula as follows:
dateTimeVar xx := DateTimeValue (date({timesheet.startdate},timevalue({timesheet.starttime} );
This seemed to work for many records but then I got an error message, "Bad time value".
I scanned the records in a separate report and could not find anything wrong.
I solved the problem by converting the hours, minutes and seconds to numbers and then converting those variable to time.
QUESTION: Is there a way of traping bad data? Does crystal have the equivalent of "on error"?
Thanks in advance.
Howard Hammerman,
Crystal Training and Crystal Material
On-site classes and one-on-one coaching
Low-cost telephone/email support