AsDateTime giving strange results

AsDateTime giving strange results

Postby sgreenhall » Mon 06 Nov 2006 17:10

If I have a date field withing Oracle which is holding a time of 9:52. The fraction part of the field is 4.111111.........

Once I access this value using FieldByName('...').AsDateTime the value seems to change. If I display the value I get '39027.411111111112400000'.

If I create a TDateTime variable within Delphi and encode the time '9:52' into this variable I get:
'39027.411111111111100000'

Are there any problems with the TSQLTimeStampField with converting the value to a TDateTime?
sgreenhall
 
Posts: 2
Joined: Mon 06 Nov 2006 16:53

Postby Plash » Fri 10 Nov 2006 12:32

We cannot reproduce the problem. Please provide Delphi code that you use. Also specify your versions of dbExpress driver and Delphi.
Plash
Devart Team
 
Posts: 2844
Joined: Wed 10 May 2006 07:09

Postby sgreenhall » Mon 20 Nov 2006 10:27

The problem seems to be with the StrToTime function returning a more accurate value than standard TDateTime routines.

Not a corelab issue.
sgreenhall
 
Posts: 2
Joined: Mon 06 Nov 2006 16:53


Return to dbExpress driver for Oracle