Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 3 of 3 total |
Why can't a TEDBTable using a TField, be able to store seconds into an EDB TimeStamp column? |
Sat, Nov 8 2014 6:48 PM | Permanent Link |
Barry | I have a Delphi XE2 (Unicode) app and an EDB v2.13B2 (Unicode) database and when I set a TField that is DateTime to something with seconds, like 11/3/2003 1:00:01, and save the EDB record, the TField.Value, it is correctly shown in the debugger as "11/3/2003 1:00:01" but the value stored in the database is "2003-11-03 1:00". It is missing the seconds ":01". Why?
I can manually enter the timestamp in the same column using EDBMgr just fine. But a Delphi TField won't save the seconds for the TimeStamp column. My application is using TEDBTables and I don't want to have to update the row using SQL. Has anyone else noticed this problem with TEDBTable and TimeStamp columns? TIA Barry |
Sun, Nov 9 2014 6:46 AM | Permanent Link |
Adam Brett Orixa Systems | Barry
I regularly save seconds in my Apps (Delphi XE2) so it is not hard to do. Very quick reply that is likely to only partly correct .... I think you may have to change the TFormatSettings (or another similar property) of the TField to increase its accuracy. EDB Timestamp is accurate to milliseconds, so I am sure that the problem is somewhere in the Delphi side of the code, not the EDB side. Adam |
Sun, Nov 9 2014 11:54 AM | Permanent Link |
Barry | Adam Brett wrote:
>I regularly save seconds in my Apps (Delphi XE2) so it is not hard to do.< Using TEDBTable? >I think you may have to change the TFormatSettings (or another similar property) of the TField to increase its accuracy.< Except in the debugger the TField.Value is correct, so the TField has the timestamp with the seconds in it. When the record is saved, EDBMgr shows no seconds yet the TField still has the seconds. >EDB Timestamp is accurate to milliseconds, so I am sure that the problem is somewhere in the Delphi side of the code, not the EDB side.< Correct. The problem is on the Delphi side of things, not the EDB server. I thought it might have to do with the EDB Delphi code that saves the TDateTime to the database (rounding?). I will try to replicate the problem in a test database to see what happens. Barry |
This web page was last updated on Wednesday, June 12, 2024 at 01:54 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |