Page 1 of 1

AsDateTime giving strange results

Posted: Mon 06 Nov 2006 17:10
by sgreenhall
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?

Posted: Fri 10 Nov 2006 12:32
by Plash
We cannot reproduce the problem. Please provide Delphi code that you use. Also specify your versions of dbExpress driver and Delphi.

Posted: Mon 20 Nov 2006 10:27
by sgreenhall
The problem seems to be with the StrToTime function returning a more accurate value than standard TDateTime routines.

Not a corelab issue.