cDate = '081308' cTime = '0945' cValue = cDate + cTime dNewDate = CTOT(TRANSFORM(cValue),'@R ^99/99/99T99:99:99'))The Result is a valid DateTime.
IF cValue is a valid datetime dNewDate = CTOT(TRANSFORM(cValue),'@R ^99/99/99T99:99:99')) ELSE * This is some other type and I do not want to try and convert it ENDIFThis is for a report where cValue can be anything. It is always character, but on the report I want to evaluate it and display a real date if it is a date, but leave it alone if it is not.