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 |
|
sanjay5219
Posting Yak Master
240 Posts |
Posted - 2012-09-24 : 09:03:56
|
| Hi All,I have one column in which I am storing est date now i have to update one more column IST.Please suggest what should i write in UPdate query |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2012-09-24 : 09:14:10
|
[code]update yourtableset IST = dateadd(hour, <time difference>, EST)[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-09-24 : 09:20:21
|
Since you said EST (i.e., Eastern Standard Time), and if that is all you want to do, it may be simple - just add 630 minutes (i.e., 10.5 hours) to EST.DATEADD(minute,630,EST); However, I suspect there is more to it because the time recorded may be EST (Eastern Standard Time) or EDT (Eastern Daylight time) depending on the time of the year. EST is 10.5 hours behind IST and EDT is 9.5 hours behind IST. If you do need to consider EDT vs EST, it is a bit more work. |
 |
|
|
|
|
|