All Date
Convertion For Simple Understanding with output as discription name in SQL
SERVER
Step 1:- Open sql
empty editer copy the below code
select convert(varchar, getdate(), 1) as MonthDateYear
select convert(varchar, getdate(), 2) as
YearMonthDate_With_Dot
select convert(varchar, getdate(), 3) as DateMonthYear
select convert(varchar, getdate(), 4) as
DateMonthYear_With_Dot
select convert(varchar, getdate(), 5) as
DateMonthYear_With_hyphen
select convert(varchar, getdate(), 6) as
DateMonthNameYear_With_Space
select convert(varchar, getdate(), 7) as MonthNameDateYear_With_SingleComma
select convert(varchar, getdate(), 8) as Only_Time
select convert(varchar, getdate(), 9) as
CompleteDate_With_Time
select convert(varchar, getdate(), 10) as
MonthDateYear_With_hyphen
select convert(varchar, getdate(), 11) as
YearMonthDate_With_Slash
select convert(varchar, getdate(), 14) as Complte_Time_With_Milliseconds
select convert(varchar, getdate(), 101) as
MonthDateFullYear_With_Slash
select convert(varchar, getdate(), 102) as
FullYearMonthDate_With_Dot
select convert(varchar, getdate(), 103) as
DateMonthFullYear_With_Slash
select convert(varchar, getdate(), 104) as
DateMonthFullYear_With_Dot
select convert(varchar, getdate(), 105) as
DateMonthFullYear_With_hyphen
select convert(varchar, getdate(), 106) as DateMonthNameFullYear_With_Space
select convert(varchar, getdate(), 107) as MonthNameDateFullYear_With_SingleComma
select convert(varchar, getdate(), 110) as
MonthDateFullYear_With_hyphen
select convert(varchar, getdate(), 111) as
FullYearMonthdate_With_Slash
No comments:
Post a Comment