Page 1 of 1
Viewing a Timestamp field correctly in a DBGrid
Posted: Thu 25 Oct 2012 00:33
by tjn006
Hello!
I am working with a MYSQL table in a DBGrid and one field is a Timestamp field. My grid treats it as a numeric field. I want to view it as a date/Time field. What should I do to convert this data?
Thanks in advance!
Tom Nesler
Re: Viewing a Timestamp field correctly in a DBGrid
Posted: Thu 25 Oct 2012 08:16
by AndreyZ
Hello,
I cannot reproduce this problem. MyDAC creates TDateTimeField fields for TIMESTAMP columns.
Please specify the following:
- the exact version of MyDAC. You can learn it from the About sheet of TMyConnection Editor;
- the exact version of your IDE;
- the exact version of MySQL server and client you are using. You can learn it from the Info sheet of TMyConnection Editor.
Re: Viewing a Timestamp field correctly in a DBGrid
Posted: Thu 25 Oct 2012 23:34
by tjn006
My mistake...

I assumed that a field called Timestamp would in fact be a timestamp field but no, it is an unsigned Integer field...<arrrghh> I will have to contact my DBA and find out how to handle this field in an OnCalcFields Event.
Thanks for your patience and quick response...
Tom Nesler
Re: Viewing a Timestamp field correctly in a DBGrid
Posted: Fri 26 Oct 2012 08:04
by AndreyZ
Feel free to contact us if you have any other questions about MyDAC.