MySQL Date Functions |
|
No. | Function | Description |
70 | ADDDATE |
Returns a date after a certain time/date interval has been added |
71 | ADDTIME |
Returns a time/datetime after a certain time interval has been added |
72 | CURDATE |
Returns the current date |
73 | CURRENT_DATE |
Returns the current date |
74 | CURRENT_TIME |
Returns the current time |
75 | CURRENT_TIMESTAMP |
Returns the current date and time |
76 | CURTIME |
Returns the current time |
77 | DATE |
Extracts the date value from a date or datetime expression |
78 | DATEDIFF |
Returns the difference in days between two date values |
79 | DATE_ADD |
Returns a date after a certain time/date interval has been added |
80 | DATE_FORMAT |
Formats a date as specified by a format mask |
81 | DATE_SUB |
Returns a date after a certain time/date interval has been subtracted |
82 | DAY |
Returns the day portion of a date value |
83 | DAYNAME |
Returns the weekday name for a date |
84 | DAYOFMONTH |
Returns the day portion of a date value |
85 | DAYOFWEEK |
Returns the weekday index for a date value |
86 | DAYOFYEAR |
Returns the day of the year for a date value |
87 | EXTRACT |
Extracts parts from a date |
88 | FROM_DAYS |
Returns a date value from a numeric representation of the day |
89 | HOUR |
Returns the hour portion of a date value |
90 | LAST_DAY |
Returns the last day of the month for a given date |
91 | LOCALTIME |
Returns the current date and time |
92 | LOCALTIMESTAMP |
Returns the current date and time |
93 | MAKEDATE |
Returns the date for a certain year and day-of-year value |
94 | MAKETIME |
Returns the time for a certain hour, minute, second combination |
95 | MICROSECOND |
Returns the microsecond portion of a date value |
96 | MINUTE |
Returns the minute portion of a date value |
97 | MONTH |
Returns the month portion of a date value |
98 | MONTHNAME |
Returns the full month name for a date |
99 | NOW |
Returns the current date and time |
100 | PERIOD_ADD |
Takes a period and adds a specified number of months to it |
101 | PERIOD_DIFF |
Returns the difference in months between two periods |
102 | QUARTER |
Returns the quarter portion of a date value |
103 | SECOND |
Returns the second portion of a date value |
104 | SEC_TO_TIME |
Converts numeric seconds into a time value |
105 | STR_TO_DATE |
Takes a string and returns a date specified by a format mask |
106 | SUBDATE |
Returns a date after which a certain time/date interval has been subtracted |
107 | SUBTIME |
Returns a time/datetime value after a certain time interval has been subtracted |
108 | SYSDATE |
Returns the current date and time |
109 | TIME |
Extracts the time value from a time/datetime expression |
110 | TIME_FORMAT |
Formats a time as specified by a format mask |
111 | TIME_TO_SEC |
Converts a time value into numeric seconds |
112 | TIMEDIFF |
Returns the difference between two time/datetime values |
113 | TIMESTAMP |
Converts an expression to a datetime value and if specified adds an optional time interval to the value |
114 | TO_DAYS |
Converts a date into numeric days |
115 | WEEK |
Returns the week portion of a date value |
116 | WEEKDAY |
Returns the weekday index for a date value |
117 | WEEKOFYEAR |
Returns the week of the year for a date value |
118 | YEAR |
Returns the year portion of a date value |
119 | YEARWEEK |
Returns the year and week for a date value |