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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bad Time Format String

Status
Not open for further replies.

mrichey

MIS
Nov 22, 2002
71
US
I keep running into issues with converting a string to time.
I use CTime, and the error check runs fine, but when I refresh the report, I get "bad time format string" errors. This only happens in certain instances and sometimes seems to be affected by grouping. Is there any way to determine which records' data are causing the problem? Thanks very much for any help!

Mark
 
You might want to check for the column being null, or an invalid length, or that it is numeric (if that's the format of the data) within the record selection formula to limit rows to potentially bad data.

if isnull({table.field})
or
len({table.field}) > X
or
len({table.field}) < Y
or
not (numerictext({table.field}))

etc.

It's generally best to post example data in your posts, along with relevant formulas.

Storing dates as strings is generally a bad idea, and NOT having validation when writing the rows is nerve wracking.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top