Hi there could anyone please help me in getting my date in the format YYYY-MM-DD as none of the below appears to do it Thanks a lot
S
select
convert(varchar, GetDate(), 100) as '100 Conversion',
convert(varchar, GetDate(), 101) as '101 Conversion',
convert(varchar, GetDate(), 102) as '102 Conversion',
convert(varchar, GetDate(), 103) as '103 Conversion',
convert(varchar, GetDate(), 104) as '104 Conversion',
convert(varchar, GetDate(), 105) as '105 Conversion',
convert(varchar, GetDate(), 106) as '106 Conversion',
convert(varchar, GetDate(), 107) as '107 Conversion',
convert(varchar, GetDate(), 108) as '108 Conversion',
convert(varchar, GetDate(), 109) as '109 Conversion',
convert(varchar, GetDate(), 110) as '110 Conversion',
convert(varchar, GetDate(), 111) as '111 Conversion',
convert(varchar, GetDate(), 112) as '112 Conversion',
convert(varchar, GetDate(), 113) as '113 Conversion',
convert(varchar, GetDate(), 114) as '114 Conversion',
convert(varchar, GetDate(), 120) as '120 Conversion',
convert(varchar, GetDate(), 121) as '121 Conversion',
convert(varchar, GetDate(), 126) as '126 Conversion',
convert(varchar, GetDate(), 130) as '130 Conversion',
convert(varchar, GetDate(), 131) as '132 Conversion'
S
select
convert(varchar, GetDate(), 100) as '100 Conversion',
convert(varchar, GetDate(), 101) as '101 Conversion',
convert(varchar, GetDate(), 102) as '102 Conversion',
convert(varchar, GetDate(), 103) as '103 Conversion',
convert(varchar, GetDate(), 104) as '104 Conversion',
convert(varchar, GetDate(), 105) as '105 Conversion',
convert(varchar, GetDate(), 106) as '106 Conversion',
convert(varchar, GetDate(), 107) as '107 Conversion',
convert(varchar, GetDate(), 108) as '108 Conversion',
convert(varchar, GetDate(), 109) as '109 Conversion',
convert(varchar, GetDate(), 110) as '110 Conversion',
convert(varchar, GetDate(), 111) as '111 Conversion',
convert(varchar, GetDate(), 112) as '112 Conversion',
convert(varchar, GetDate(), 113) as '113 Conversion',
convert(varchar, GetDate(), 114) as '114 Conversion',
convert(varchar, GetDate(), 120) as '120 Conversion',
convert(varchar, GetDate(), 121) as '121 Conversion',
convert(varchar, GetDate(), 126) as '126 Conversion',
convert(varchar, GetDate(), 130) as '130 Conversion',
convert(varchar, GetDate(), 131) as '132 Conversion'