AsDateTime giving strange results

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for Oracle in Delphi and C++Builder
Post Reply
sgreenhall
Posts: 2
Joined: Mon 06 Nov 2006 16:53

AsDateTime giving strange results

Post by 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?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by 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.

sgreenhall
Posts: 2
Joined: Mon 06 Nov 2006 16:53

Post by 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.

Post Reply