>>>Does anyone know how to turn a DateTime type field to a Date type field in a SQLEXEC cursor, not a remote view?
>>>
>>>TIA
>>>
>>>MOnTe
>>
>>Have you looked at TTOD() or TTOC()?
>
>I am changing the SQLEXEC cursor to allow updates. The date column in the cursor can be changed in a grid and you cannot update a calculated column (e.g. TTOD(closed_date)). Basically, I want to do to a SQLEXEC cursor what you can already do to a remote view like with the following command:
>DBSetProp('rvClosed.closed_date', 'Field', 'DataType', "D")
>
>Any other ideas?
What's your backend database? If it's SQL Server you could use the CONVERT() function to return only the date portion in a character field. Then whenever you send the updates SQL Server will not complain about the type, as long as it's in a date format that it can understand. I think it's Convert(character(10), myField, 121) to get the date portion only on a character field.
How are you planning to send the updates back?
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement