Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 date time help needed urgently

Author  Topic 

keyur
Starting Member

4 Posts

Posted - 2001-11-30 : 02:47:41
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

143 Posts

Posted - 2001-11-30 : 03:11:19
Have you tried DATEADD ?

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

Sica

Go to Top of Page

sandesh_moghe
Constraint Violating Yak Guru

310 Posts

Posted - 2001-11-30 : 06:29:15
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

4 Posts

Posted - 2001-11-30 : 07:20:44
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
   

- Advertisement -