Hello
I have a problem and I don't know how to sort it out. Why when I convert a date value to double in access vba I receive a value and when I convert the same data value to decimal in sql I receive a diferent value.
Example:
Access vba
The resuls of this code is 40547
SQL
the result returned is 40545
I realy don't understand why is this happening, in my opinion it should return the same result in both cases.
I have a problem and I don't know how to sort it out. Why when I convert a date value to double in access vba I receive a value and when I convert the same data value to decimal in sql I receive a diferent value.
Example:
Access vba
Code:
dim data as date data=date (today is 04/01/2011) msgbox(cdbl(data))
SQL
Code:
set dateformat 'dmy' seclare @data datetime, @variabila decimal set @data='04/01/2011' set @variabila=convert(decimal,@data) print @variabila
I realy don't understand why is this happening, in my opinion it should return the same result in both cases.
Comment