hi:
top of the day to all!
i have an application that reads a file from a hand-held device (through hyper-terminal), that got it's data from a computer mounted in a truck. the file is an ascii format and the first field is a date stamp. the file is imported into a table that all fields are character. then that table is appended to a table which the first field is a date field. under normal situations i would get an ascii value of
09/19/02
in the first field (first table) and it would append to the second table as
09/19/2002
this works like a charm!
if the clock battery in the truck dies the first field may contain something like:
a>/3?/ww (random garbage)
and the append to the second table will crash as it is not a valid date.
what i need to do is to examine the first (character table) field and determine if it contains a valid date prior to the append. if it does not contain a valid date i can just use the date 01/01/01 which is (filtered out later as an invalid date) however the append will still run.
is there an easier way other than testing each character pair between the slashes? i thought of the "eval_valid" function, but i don't think that this is what it does.
any help much appreciated!!
regards,
ed
top of the day to all!
i have an application that reads a file from a hand-held device (through hyper-terminal), that got it's data from a computer mounted in a truck. the file is an ascii format and the first field is a date stamp. the file is imported into a table that all fields are character. then that table is appended to a table which the first field is a date field. under normal situations i would get an ascii value of
09/19/02
in the first field (first table) and it would append to the second table as
09/19/2002
this works like a charm!
if the clock battery in the truck dies the first field may contain something like:
a>/3?/ww (random garbage)
and the append to the second table will crash as it is not a valid date.
what i need to do is to examine the first (character table) field and determine if it contains a valid date prior to the append. if it does not contain a valid date i can just use the date 01/01/01 which is (filtered out later as an invalid date) however the append will still run.
is there an easier way other than testing each character pair between the slashes? i thought of the "eval_valid" function, but i don't think that this is what it does.
any help much appreciated!!
regards,
ed
Comment