>>>
>>>Hmm. I have VFP8 SP1 and TTOC(,2) is a valid option.
>>
>>Right, I was thinking about TTOC(,3). Anyway, how TTOC(,2) will help you if it returns time part only?
>
>You're right. I didnt check that. I will have to dig which one converts properly to SQL Server datetime. Is it better to use CAST instead of CONVERT? I havent tried converting the data using CAST.
Try
[CAST( '] + TRANSFORM(TTOC(DATETIME(),1), "@R 9999-99-99 99:99:99") + [' AS datetime])
--sb--