Viewing a Timestamp field correctly in a DBGrid

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
tjn006
Posts: 10
Joined: Tue 06 Mar 2012 16:48

Viewing a Timestamp field correctly in a DBGrid

Post by tjn006 » Thu 25 Oct 2012 00:33

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

AndreyZ

Re: Viewing a Timestamp field correctly in a DBGrid

Post by AndreyZ » Thu 25 Oct 2012 08:16

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.

tjn006
Posts: 10
Joined: Tue 06 Mar 2012 16:48

Re: Viewing a Timestamp field correctly in a DBGrid

Post by tjn006 » Thu 25 Oct 2012 23:34

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

AndreyZ

Re: Viewing a Timestamp field correctly in a DBGrid

Post by AndreyZ » Fri 26 Oct 2012 08:04

Feel free to contact us if you have any other questions about MyDAC.

Post Reply