Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 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 May 21st, 2004, 10:40 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Can you post the SQL query that you use to get the date from SQL SERVER DB, along with the way you are trying to grab the value into ASP/ASP.net variables.

That should be useful to help you in a better way.
Cheers!

-Vijay G
 
Old July 16th, 2004, 01:06 PM
Registered User
 
Join Date: Jul 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Apologies if this is common knowledge but I have an answer to the SQL Server date time bug, which has been haunting me for 3 days. This applies to the .NET problem. Even if you set SQL Server to UK and all the Server Regional Settings are UK but the website output the date time to mm/dd/yyyy hh:mm AM/PM this is what you can try:

-----------------------------------------------------
GOTO:- C:\WINDOWS\Microsoft.NET\Framework\v1.x\CONFIG
EDIT:- machine.conf
CHANGE:-
from: <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
to: <globalization requestEncoding="utf-8" culture="en-GB" uiCulture="en-GB" responseEncoding="utf-8"/>
-----------------------------------------------------

You should know see the datetime in the following format

DD/MM/YYYY HH:MM:SS (24hr)

It because if you have installed the framework on a server which is set initially to UK the system config for .NET sets itself to UK. However if you then migrate the server to a US based server (which is what we had done), the framework system is by default set to US.

By making the change to the machine.conf file all subsequent .net applications will be set to UK. If you wish to only apply this to one application/website you must override the system datetime setting in the cs classes, by changing the DateTimeHandler class which is part of the System.Globalization assembly.





Similar Threads
Thread Thread Starter Forum Replies Last Post
ComboBox Mayhem Frustration. snw C# 1 November 28th, 2005 05:06 AM
UTC DateTime to Local DateTime r_ganesh76 SQL Server 2000 1 April 4th, 2005 08:21 AM
More Export.csv mayhem Morris Access 1 February 24th, 2004 12:52 PM
Date Time Mayhem in SQL2000 dfalconer SQL Server ASP 0 February 9th, 2004 06:57 AM





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