Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
whitmoj
Yak Posting Veteran
68 Posts |
Posted - 2009-06-04 : 06:38:28
|
| I wonder if any one can get there head round this I have a date field that reads the following 39937.0 I have tried Cast & Convert to change it to the correct date but it seems to add 2 days on. The actual Date should be 04/05/09 but when I use the Cast Or Convert statements it gives me the 06/05/09. Many ThanksWhitmojIf I have inspired one person today then my job is done. |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-06-04 : 06:42:03
|
If the date value originally derives from Excel, you are correct the date is two days off because of another base date (date zero) for Excel.SELECT DATEADD(DAY, -2, Col1) E 12°55'05.63"N 56°04'39.26" |
 |
|
|
whitmoj
Yak Posting Veteran
68 Posts |
Posted - 2009-06-04 : 07:17:54
|
| Many thanks Peso works a treatWhitmojIf I have inspired one person today then my job is done. |
 |
|
|
|
|
|