You're welcome.
>works like a charm. Thanks, Sergey.
>
>>Try
>>
>>dVal_date = CAST(aCondition[nCond_row,3] AS datetime)
>>
>>>
>>>I have a program where I save a date or datetime, depending on what field they pick. Later, the user can go back in and edit that field variable they saved. But I can not seem to get CTOT() or CTOD() to work correctly with the variable after I get it from the same table, where it is saved as a character string.
>>>
>>> dVal_date = CTOT(SUBSTR(aCondition[nCond_row,3], AT("(", aCondition[nCond_row,3]) + 2, nDate_width + 12))
>>>
>>>so I tried,
>>>
>>> lcstring = SUBSTR(aCondition[nCond_row,3], AT("(", aCondition[nCond_row,3]) + 2, nDate_width + 12)
>>> lcstring = strtran(lcstring, ["])
>>> dVal_date = CTOT(lcstring)
>>>
>>>
>>>dVal_date keeps saying { // :: }, not the correct time.
>>>The value in aCondition[nCond_row,3] is "01/01/2001 12:00 AM"
>>>
>>>Can someone point me to my problem?
>>>
>>>TIA
>>>Beth
--sb--