Check out example codes for "get day in sql". It will help you in understanding the concepts better.

Code Example 1

extract(dow from payment_date)

Code Example 2

SELECT DATEPART(m, GETDATE()) as theMonth  -- returns 11
SELECT DATEPART(d, GETDATE()) as theDay   -- returns 20
SELECT DATEPART(yy, GETDATE()) as theYear   -- returns 2013

Learn ReactJs, React Native from akashmittal.com