Have you ever wanted to return the value of the current day? Month? Or year? Well its easy in SQL and I am going to show you how.
The query for the current day is below.
The query for the current month is below.
The query for the current year is below.
Each query will return a number which will correspond to the information required. For example a value of 2 returned is February in the month query.