Board index » delphi » SQL Query and DateTime Field accuracy problem.
dlgl...@ibm.net (Don Gollahon)
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
|
dlgl...@ibm.net (Don Gollahon)
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
SQL Query and DateTime Field accuracy problem.I have what I think is a date time accuracy problem. I use MSSQL 6.5, QRY.ParamsByName('vdate').asdatetime = vdatefld the actual value used is '12/18/97 8:23:45 AM' which is off by How can I get the correct value in the query? Thanks. Don Gollahon (dlgl...@ibm.net) |
Curt Tabo
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:SQL Query and DateTime Field accuracy problem.Quote
formatDateTime function that gets rid of the milliseconds, seconds or whatever you want it to. Then pass that string into a StrToDateTime call which will give you a TDateTime w/o the milliseconds. You can do that to NOT put milliseconds into the DB. But to answer the question ; If milliseconds are blowing up the query then |
Don Gollah
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:SQL Query and DateTime Field accuracy problem.I need the time exactly as it is. I'll just have to fudge in the Thanks. Quote"Curt Tabor" <cta...@ixpres.com> wrote: |
Mark G. Gille
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:SQL Query and DateTime Field accuracy problem.Don, If possible convert your key field to a string type and store the datetime A question I have is why the milliseconds are being truncated in the first Regards, Don Gollahon <dlgl...@ibm.net> wrote in article Quote> I have what I think is a date time accuracy problem. I use MSSQL 6.5, |
Don Gollah
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:SQL Query and DateTime Field accuracy problem.I got the form to work partially. I used the asFloat method and it My problems now is, I allow the user to alter the data for that record "Mark G. Gillen" <mggil...@gte.net> wrote: Quote>Don, |
1. SQL Queries against a DateTime Field
2. Problem querying Access DATETIME fields
3. Problem with Datetime Field with SQL SELECT
4. Problem with DateTime Field in Select SQL
5. MS SQL Datetime field update problem
6. Problem with Datetime field en SQL Server 6.5 and Delphi 3
7. Informix live query with selection on datetime field