Hi there,
I've got a problem, when subtracting two dates, say from Date and Time picker I get the correct result. But when subtracting a Date from a paradox database date field I get incorrect results. Upon investigating this I found that delphi converts dates to doubles, say 10 June 2004 will be 3427 and 11 Junbe 2004 will become 3428. My problem, when I get the date from the database,
dateAndTimePicke:=FieldInDataBase('field').AsDate then the
double from dateAndTimePicker (doubl:=dateandtimepicker, becomes 3427.45362837. Hope you follow. The result has a lot of unexplained decimals. If I want to establish if the 10'th smaller than the 9'th it doesn't return the correct result.
Any opinions or ideas on this. I finally got this sorted out by using the StrToFloat and then reconverting the result without the extra decimals.
Any input will be regarded as useful.
Thank you
I've got a problem, when subtracting two dates, say from Date and Time picker I get the correct result. But when subtracting a Date from a paradox database date field I get incorrect results. Upon investigating this I found that delphi converts dates to doubles, say 10 June 2004 will be 3427 and 11 Junbe 2004 will become 3428. My problem, when I get the date from the database,
dateAndTimePicke:=FieldInDataBase('field').AsDate then the
double from dateAndTimePicker (doubl:=dateandtimepicker, becomes 3427.45362837. Hope you follow. The result has a lot of unexplained decimals. If I want to establish if the 10'th smaller than the 9'th it doesn't return the correct result.
Any opinions or ideas on this. I finally got this sorted out by using the StrToFloat and then reconverting the result without the extra decimals.
Any input will be regarded as useful.
Thank you