I have interest to work at Malaysia if any openings please let me know Click here...

Saturday, March 31, 2012

Datetime Convertion in mssql



select CONVERT(varchar(35),GETDATE(),100) -- Mar 22 2012 11:35AM
select CONVERT(varchar(35),GETDATE(),101) -- 03/22/2012
select CONVERT(varchar(35),GETDATE(),102) -- 2012.03.22

select CONVERT(varchar(35),GETDATE(),103) -- 22/03/2012
select CONVERT(varchar(35),GETDATE(),104) -- 22.03.2012
select CONVERT(varchar(35),GETDATE(),105) -- 22-03-2012


select CONVERT(varchar(35),GETDATE(),106) -- 22 Mar 2012
select CONVERT(varchar(35),GETDATE(),107) -- Mar 22, 2012
select CONVERT(varchar(35),GETDATE(),108) -- 11:40:04

select CONVERT(varchar(35),GETDATE(),109) -- Mar 22 2012 11:40:15:730AM

select CONVERT(varchar(35),GETDATE(),110) -- 03-22-2012
select CONVERT(varchar(35),GETDATE(),111) -- 2012/03/22

select CONVERT(varchar(35),GETDATE(),112) -- 20120322
select CONVERT(varchar(35),GETDATE(),113) -- 22 Mar 2012 11:41:07:593


select CONVERT(varchar(35),GETDATE(),120) -- 2012-03-22 11:46:37
select CONVERT(varchar(35),GETDATE(),121) -- 2012-03-22 11:46:49

select CONVERT(varchar(35),GETDATE(),126) -- 2012-03-22T11:47:49.
select CONVERT(varchar(35),GETDATE(),127) -- 2012-03-22T11:48:01
 

No comments:

Post a Comment

Comments

Search

Custom Search
Protected by Copyscape Plagiarism Software