#766 closed defect (fixed)
SQLServer Spatial Date Format problem
Reported by: | bscott | Owned by: | danstoica |
---|---|---|---|
Priority: | major | Milestone: | 3.8.0 |
Component: | SQLServer Spatial | Version: | 3.8.0 |
Severity: | 1 | Keywords: | |
Cc: | External ID: |
Description
Hi all, I'm trying the SqlServer Spatial for the first time and i have some problems with dates
I'm setting an FdoDateTime correctly but on an update or insert i'm getting this error on some dates.
RDBMS: [Microsoft][ODBC SQL Server Driver][SQL Server]La conversion d'un type de données varchar en type de données datetime a créé une valeur hors limites.
It's a French SqlServer
Date that works ok 2007-01-01 Date that failed 2007-01-13 The format here is YYYY-MM-DD
My guess here is that MM and DD are substitued.
Nabble thread :http://osgeo-org.1803224.n2.nabble.com/SqlServerSpatial-Date-Format-problem-td6283546.html#a6528218
Bruno Scott
Attachments (4)
Change History (7)
by , 13 years ago
Attachment: | sqlsrvDate35.patch added |
---|
by , 13 years ago
Attachment: | sqlsvrDate36.patch added |
---|
by , 13 years ago
Attachment: | sqlsrvDataTrunk.patch added |
---|
by , 11 years ago
Attachment: | SqlservDate_trunk_uptodate.patch added |
---|
comment:1 by , 11 years ago
Milestone: | 3.6.0 → 3.8.0 |
---|---|
Version: | 3.6.0 → 3.8.0 |
I'm coming back on this ticket.
The SqlServerSpatial provider format the dates as YYYY-MM-DD And some localized SqlServer sees that date as YYYY-DD-MM. It is safer to use the ISO format YYYYMMDD (without -)
Excerpt from / How to Set the Day/Month/Year Date Format in SQL Server:
A possible solution to this is to use the ISO Standard format for sending the datetime data to SQL Server, which is "YYYYMMDD" (no separators). Using the ISO format is more "international," and is independent of the default language
I'm joining a new trunk based up to date patch other patches can be ignored
Up to date Trunk based patch