Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server ASP
SQL Server ASP Discussions about ASP programming with Microsoft's SQL Server. For more ASP forums, see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 9th, 2004, 06:57 AM
Authorized User
Join Date: Feb 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default Date Time Mayhem in SQL2000

I asked this in the SQL forum with no joy, so apologies if you have read it before, however i thoguht i would try this forum as the problem does involve asp output. Cheers

Here Goes....

We are migrating from our current server:
located: UK
Database: SQL Server 7
OS: Windows NT

To a new server
located: US
Database: SQL Server 2000
OS: Windows 2003

To move the databases i did a back up and restore. All dates within datetime fields in old databases showed dates in YYYY-MM-DD HH:MM:SS

When i did the initial restore to the new database, ontop of a blank one which i set up, the dates came through in MM-DD-YYYY. So i went into the server regional settings and made them UK and this seemed to resolve theproblem by changing the existing dates to DD-MM-YYYY and also creating any new ones added in the same fashion (including restires of other databases) ....still with me

This meant that my queries which took dates as parameters in my asp website and queried the database based on these parametres now worked. However i notice that even though the dates in the database tables are in UK format and the short date format in the regional settings is in dd/mm/yy (i changed the short date format to be this, instead of yyyy) when i do a query and return dates from the database to the webpage the format i get back is MM/DD/YYYY e.g. 5/25/2005. I dont specify a locale in the code but never did with the old server and the System DSN i am using have th elanguage set to British English and are set to output using the regional settings.

This is driving me crazy any help would be most appreciated.

Similar Threads
Thread Thread Starter Forum Replies Last Post
date and time in EST time zone anboss XSLT 1 May 21st, 2008 01:42 PM
SQL2000 and inserting Date value lucian Dreamweaver (all versions) 1 November 26th, 2004 12:22 PM
DateTime Mayhem in SQL2000 dfalconer SQL Server 2000 11 July 16th, 2004 01:06 PM
SQL2000 Date/Time field update Lucian Ion Dreamweaver (all versions) 9 January 2nd, 2004 09:14 PM
insert system date. no date and time jimmy Access VBA 6 November 20th, 2003 01:11 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.