TWebDBGrid and date formatting

Hi,
Working with TWebClientConnection & TWebClientDataSet.
I have field with data send from the backend as "2024-04-18" - I want to treat it as string.
In field editor, it is TStringField, and in TWebDBEdit it is displayed correctly.

However, in the TWebDBGrid, the data is parsed as date and the displayed as 18/4/2024.

I tried using OnGetText and it does not help.

Finally I solved it by a BAD workaround, I send it from the server as string which cannot be parsed to date by adding leading underscore, i.e. "2024-04-18" and in OnGetText I remove the leading ''. But this is bad solution.

Please advise,

I've had a similar issue, I've tried forcing the application formatting options but to no avail.

In the end I create a calculated field to handle the formatting.

We have seen this issue where it indeed tries to autoformat the date and/or time if it recognizes the value as an ISO date/time value. We have added a property in TGridColumn with which you will be able to turn off this auto formatting behavior.

1 Like