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 2005 Forums
 Transact-SQL (2005)
 UTC Date time should be in format 2010-02-24T17:08

Author  Topic 

rajasekhar857
Constraint Violating Yak Guru

396 Posts

Posted - 2010-03-02 : 01:02:20
hi,
iam having a table A where column ABC is a varchar field with varchar2(50).

currently data stored is like this.
02-27-2009 11:01:33
02-27-2009 11:01:46
03-06-2009 09:07:18


now i want UTC Date time should be in format 2010-02-24T17:08:09Z.

in the above format.please help me in providing a query related ti this.

pk_bohra
Master Smack Fu Yak Hacker

1182 Posts

Posted - 2010-03-02 : 01:16:52
Try this:

Select convert(varchar, cast(Sdate as datetime),126) as Fdate
from
(
Select '02-27-2009 11:01:33' as SDate
union
select '02-27-2009 11:01:46' as SDate
union
select '03-06-2009 09:07:18' as SDate
) as SubTab


Regards,
Bohra
Go to Top of Page

rajasekhar857
Constraint Violating Yak Guru

396 Posts

Posted - 2010-03-02 : 01:22:00
and even i want to store it from now onwards for each row for the column.is there any query
Go to Top of Page
   

- Advertisement -