I have a decimal no 36997.6950553241. If I use cdate(36997.6950553241) in vb, the date returned just 2 days before I use convert(datetime, 36997.6950553241) in SQL server. Can anybody explain this???
Printable View
I have a decimal no 36997.6950553241. If I use cdate(36997.6950553241) in vb, the date returned just 2 days before I use convert(datetime, 36997.6950553241) in SQL server. Can anybody explain this???
Part of the problem will be due to rounding. SQLServer can handle larger decimals than VB. Not sure why you want to do a Cdate on a decimal though, the fact that it returned 2 days before I suspect was a fluke. I'd be surprised if it was consistant.