Home My Account

SQL - How to extract month from year

June 3, 2020

In this example dob is the database column and we would like to extract the month from date dob '2010-01-01'.

We can use the SQL function month()

month(dob) = 01

Tweet