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.
Author |
Topic |
sachingovekar
Posting Yak Master
101 Posts |
Posted - 2009-12-03 : 11:14:45
|
Hi,I have a table which has a modifydate column. A trigger is defined on that column which captures current date.sql server is in US. Since server is in US 2 dates are capturted for a day in India.For eg: when it is 3rd dec 8:30 am in India, the date and time in US is 2nd dec 11 pm. so time captured is 2dec 11pm and after 1 hr the date and time captured is 3rd dec .I want to populate only India time no matter where the server is.Kinldy help |
|
sathiesh2005
Yak Posting Veteran
85 Posts |
Posted - 2009-12-04 : 06:52:33
|
Hi,You may try using the UTCDatetime.Eg. SELECT GETDATE() AS LocalTime, GETUTCDATE() AS GMTtimeUS DATE TIME (GMT time - 8:00 hours)INDIA TIME (GMT time + 5:30)By converting the US DATETIME to UTCDATETIME and then convert in to INDIAN time.This is the method upto my knowledge.If you got some other method for converting please post it to me.Best of luck.Regards,Sathieshkumar. R |
|
|
sachingovekar
Posting Yak Master
101 Posts |
Posted - 2009-12-06 : 23:27:53
|
thanks sathiesh, will try this.... |
|
|
|
|
|