Date and Time Functions • DAYNAME( date ) • DAYOFMONTH( date ) • DAYOFWEEK( date ) • DAYOFYEAR( date ) • EXTRACT( unit  FROM  date ) • FROM_DAYS( N ) • FROM_UNIXTIME( unix_timestamp [, format ]) Returns the name of the weekday for  date . The language used for the name is controlled by the value of the  lc_time_names  system variable (Section 10.16, “MySQL Server Locale Support” ). Returns the day of the month for  date , in the range  1  to  31 , or  0  for dates such as  ’0000-00-00’  or ’2008-00-00’  that have a zero day part. Returns the weekday index for  date  ( 1  = Sunday,  2  = Monday, …,  7  = Saturday). These index values correspond to the ODBC standard. Returns the day of the year for  date , in the range  1  to  366 . The  EXTRACT()  function uses the same kinds of  unit  specifiers as  DATE_ADD()  or  DATE_SUB() , but extracts parts from the date rather than performing date arithmetic. For information on the  unit argument, see Temporal Intervals. Use  FROM_DAYS()  with caution on old dates. It is not intended for use with values that precede the advent of the Gregorian calendar (1582). See Section 12.9, “What Calendar Is Used By MySQL?” . Returns a representation of the  unix_timestamp  argument as a value in  ’ YYYY-MM-DD hh:mm:ss ’ or  YYYYMMDDhhmmss  format, depending on whether the function is used in a string or numeric 2157 mysql>  SELECT DAYNAME(’2007-02-03’); -> ’Saturday’ mysql>  SELECT DAYOFMONTH(’2007-02-03’); -> 3 mysql>  SELECT DAYOFWEEK(’2007-02-03’); -> 7 mysql>  SELECT DAYOFYEAR(’2007-02-03’); -> 34 mysql>  SELECT EXTRACT(YEAR FROM ’2019-07-02’); -> 2019 mysql>  SELECT EXTRACT(YEAR_MONTH FROM ’2019-07-02 01:02:03’); -> 201907 mysql>  SELECT EXTRACT(DAY_MINUTE FROM ’2019-07-02 01:02:03’); -> 20102 mysql>  SELECT EXTRACT(MICROSECOND -> FROM ’2003-01-02 10:30:00.000123’); -> 123 mysql>  SELECT FROM_DAYS(730669); -> ’2000-07-03’ Given a day number  N , returns a  DATE  value.