Tuesday, January 31, 2012

Date Formates


SELECT CONVERT(CHAR(101),getdate(),0) as "Feb  1 2012 11:11AM"
SELECT CONVERT(CHAR(101),getdate(),1) as "02/01/12"
SELECT CONVERT(CHAR(101),getdate(),2) as "12.02.01"
SELECT CONVERT(CHAR(101),getdate(),3) as "01/02/12"
SELECT CONVERT(CHAR(101),getdate(),4) as "01.02.12"
SELECT CONVERT(CHAR(101),getdate(),5) as "01-02-12"
SELECT CONVERT(CHAR(101),getdate(),6) as "01 Feb 12"
SELECT CONVERT(CHAR(101),getdate(),7) as "Feb 01,12"
SELECT CONVERT(CHAR(101),getdate(),8) as "11:13:35"
SELECT CONVERT(CHAR(101),getdate(),9) as "Feb  1 2012 11:13:53:717AM"
SELECT CONVERT(CHAR(101),getdate(),10)as "02-01-12"
SELECT CONVERT(CHAR(101),getdate(),11)as "12/02/01"
SELECT CONVERT(CHAR(101),getdate(),12)as "120201"
SELECT CONVERT(CHAR(101),getdate(),13)as "01 Feb 2012 11:15:15:107"
SELECT CONVERT(CHAR(101),getdate(),14)as "11:15:48:340"
SELECT CONVERT(CHAR(101),getdate(),20)as "2012-02-01 11:16:09"
SELECT CONVERT(CHAR(101),getdate(),21)as "2012-02-01 11:16:36.530"
SELECT CONVERT(CHAR(101),getdate(),22)as "02/01/12 11:17:11 AM"
SELECT CONVERT(CHAR(101),getdate(),23) as "2012-02-01"

SELECT CONVERT(CHAR(101),getdate(),24) as "15:10:46"
SELECT CONVERT(CHAR(101),getdate(),25) as "2012-02-01 15:11:22.310"
SELECT CONVERT(CHAR(101),getdate(),100) as "Feb  1 2012  3:11PM"
SELECT CONVERT(CHAR(101),getdate(),101) as "02/01/2012"
SELECT CONVERT(CHAR(101),getdate(),102) as "2012.02.01"
SELECT CONVERT(CHAR(101),getdate(),103) as "01/02/2012"
SELECT CONVERT(CHAR(101),getdate(),104) as "01.02.2012"
SELECT CONVERT(CHAR(101),getdate(),105) as "01-02-2012"
SELECT CONVERT(CHAR(101),getdate(),106) as "01 Feb 2012"
SELECT CONVERT(CHAR(101),getdate(),107) as "Feb 01,2012"
SELECT CONVERT(CHAR(101),getdate(),102) as "2012.02.01"
SELECT CONVERT(CHAR(101),getdate(),109) as "Feb  1 2012  3:14:15:187PM"
SELECT CONVERT(CHAR(101),getdate(),110) as "02-01-2012"
SELECT CONVERT(CHAR(101),getdate(),111) as "2012/02/01"
SELECT CONVERT(CHAR(101),getdate(),112) as "20120201"
SELECT CONVERT(CHAR(101),getdate(),113) as "01 Feb 2012 15:15:10:700"
SELECT CONVERT(CHAR(101),getdate(),114) as "15:15:36:607"
SELECT CONVERT(CHAR(101),getdate(),120) as "2012-02-01 15:15:55"
SELECT CONVERT(CHAR(101),getdate(),121) as "2012-02-01 15:16:21.857"
SELECT CONVERT(CHAR(101),getdate(),126) as "2012-02-01T15:16:38.937"
SELECT CONVERT(CHAR(101),getdate(),130) as "9 ???? ????? 1433  3:16:58:200PM"
SELECT CONVERT(CHAR(101),getdate(),131) as " 9/03/1433  3:17:13:327PM"

No comments:

Post a Comment