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
Expand|Select|Wrap|Line Numbers
- dim data as date
- data=date (today is 04/01/2011)
- msgbox(cdbl(data))
SQL
Expand|Select|Wrap|Line Numbers
- 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.