>>>>>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?
>
>
>I'm using SQL Server. Also, I've tried the SQL Server CONVERT function, however, the date is not validated...I would have to write so sort of textbox date validator to check the date...that is what I was trying to get away from.
You could probably send individual updates manually too, validating in the BeforeRowColChange and sending the update on AfterRowColChange event.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only