I need to get the current 2 digit year and increment by one. So the current number I'm looking for should be 11.
Probably really simple but I'm a sql noob :)
Thanks
SELECT RIGHT('0' + RTRIM(MONTH('12-31-2012')), 2);
If you use SQL Server, you can use the YEAR() or DATEPART() function to extract the year from a date.
You can do ( YEAR( GETDATE() ) % 100 ) + 1
See GETDATE & YEAR
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With