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
 General SQL Server Forums
 New to SQL Server Programming
 Update data through function

Author  Topic 

ds12will
Starting Member

21 Posts

Posted - 2009-11-19 : 13:19:35
I'm using

select dbo.fn_Timezone_Conversion('CST', 'UTC', datecreated, 0)
from dbo.TimeZoneTest

to convert data from CST to UTC time in the datecreated column. How can I use the same function to update the specific column with the new timezone data?


example
update dbo.fn_Timezone_Conversion('CST', 'UTC', datecreated, 0)
from dbo.TimeZoneTest

X002548
Not Just a Number

15586 Posts

Posted - 2009-11-19 : 13:40:10
update dbo.TimeZoneTest
SET datecreated = dbo.fn_Timezone_Conversion('CST', 'UTC', datecreated, 0)


????????




Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

ds12will
Starting Member

21 Posts

Posted - 2009-11-19 : 13:42:58
quote:
Originally posted by X002548

update dbo.TimeZoneTest
SET datecreated = dbo.fn_Timezone_Conversion('CST', 'UTC', datecreated, 0)


????????




Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam







Worked like a charm thanks
Go to Top of Page
   

- Advertisement -