How to get SQL Server Date in its native format?

Posted by RoguePlanetoid on Stack Overflow See other posts from Stack Overflow or by RoguePlanetoid
Published on 2009-09-30T12:40:33Z Indexed on 2010/05/07 8:18 UTC
Read the original article Hit count: 260

I need to get a Date from an SQL Server Database (SQL Server 2000), the date is stored as such:

2009-09-30 00:00:00.000

I want to pass this date into a Classic ASP function to use this date in the Database somewhere else, however when I get the date, it converts in my ASP code to a locale-dependant version, such as:

30/09/2009

I just want the date as-is as formatting the date so it is correct again seems unnecessary, although if this the only way then fine - is there any way to treat it as string data so it stays like that, so it can be inserted back into the database as the same date, without needing conversion?

© Stack Overflow or respective owner

Related posts about sql-server-2000

Related posts about sql-server