Here’s some SQL Query to get Two Digit Year, Month and Date
Year :
1 | print right(year(getdate()), 2) |
result :
11
Month :
1 | print right('0' + month(getdate()), 2) |
result :
03
Date :
1 | print right('0' + day(getdate()), 2) |
result :
26
Here’s some SQL Query to get Two Digit Year, Month and Date
Year :
1 | print right(year(getdate()), 2) |
result :
11
Month :
1 | print right('0' + month(getdate()), 2) |
result :
03
Date :
1 | print right('0' + day(getdate()), 2) |
result :
26