SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 date time help needed urgently
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

keyur
Starting Member

India
4 Posts

Posted - 11/30/2001 :  02:47:41  Show Profile  Reply with Quote
hello guys, well this time its a problem for datepart function well our one server is lying in Michigan and the other i.e. local server is lying here in india, now the problem is of time i.e. the time of michigan is 10 hours late e.g. when its 25th November 11:OO:AM here the time over there in michigan is (24th November ) so when we want to display the records we r getting problems our customers are shouting ..
so timely help will save my job
plz reply fast ASAP
Thank u
Keyur



sica
Posting Yak Master

Sweden
143 Posts

Posted - 11/30/2001 :  03:11:19  Show Profile  Send sica an ICQ Message  Reply with Quote
Have you tried DATEADD ?

SELECT DATEADD(hh,-10,GETDATE()),GETDATE()

Sica

Go to Top of Page

sandesh_moghe
Constraint Violating Yak Guru

India
310 Posts

Posted - 11/30/2001 :  06:29:15  Show Profile  Send sandesh_moghe an AOL message  Send sandesh_moghe a Yahoo! Message  Reply with Quote
Hi Keyur,
First of all i have one query,
Where your customers are?In India, In US or All Over the World?
If they are in India or USA then you can follow the solution suggested by Sica.(You have to add/Substract that much of the Hours)
And if your customers are spread all over world, then this solution will not work. For that you have to trap time zone and according to Time Zone you have to calculate Date and time.

---------------------------
Sandesh - The Messanger
Go to Top of Page

keyur
Starting Member

India
4 Posts

Posted - 11/30/2001 :  07:20:44  Show Profile  Reply with Quote
thanks sandesh and sica for ur quick reply. well are customers are in india and some of them are spread in the US . and our server is in michigan so we are having these date problems. will definetly try the dateadd fuction and check whether it clicks or not and will get back to u
if u have any good solution then they r most welcome
thanks once again
keyur.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000