Wanted: Cast iron way to insert dates and datetimes into SQL Server 2000.
Posted on 2005-03-15
Should be easy this.
What format do I use to get a date and/or datetime into an MS SQL 2000 Server?
The server may or may not be set to use the same language as me. The server may or may not even have the same character set as me!
There must be an absolute format. One which all parts must be supplied and no chance of misunderstanding.
Ideally, something like ...
From this it is 15th March 2005 at 2:41:01 PM GMT
I'm not sure how to get Daylight Saving Time in. Different countries may have there server setup incorrectly or differently to me. I know the date time and timezone and the DST setting, so I want to pass all of this in with the data.