MySQL DATE_ADD() Function17 Mar 2025 | 1 min read The date_add() is a MySQL date/time function. It is used to get the date in which some date/datetime intervals are added. SyntaxParameter:Date: date in which interval will be added Value: date/time intervals Unit: type of interval which are as following:
ReturnsThis function will return a date after which a certain time/date interval has been added. Example![]() ![]() ![]() ![]() ![]() Next TopicMySQL date/time |
MySQL Date/Time week() Function The week() is a MySQL date/time function. It is used to get the week portion from given date. Syntax select week(date_value, [mode]); Parameter: Date_value : date for getting week Mode : it is optional. It is used to specify what day the week starts on. It can be...
1 min read
MySQL Date/Time month() Function The month() is a MySQL date/time function. It is used to get the value of month from given datetime or time. Syntax select month(date_value); Parameter: Date_value: datetime or time value for getting hour. Returns: This function returns the month portion of a date value. Example 1 select month('2018-9-28 10:20:25.000002'); Output: Example 2 select month('1995-2-11'); Output: ...
1 min read
MySQL DAYOFWEEK() Function The dayofweek() is a MySQL date/time function. It is used to get the day of the week in numeric. Syntax select dayofweek(date); Parameter: Date: date value for getting a day of the week. Returns: This function returns the weekday index for a date value. Example 1 Select dayofweek('2018-09-26'); Output: Example 2 Select dayofweek('2018-5-12'); Output: TopicMySQL date/time ...
1 min read
MySQL Date/Time makedate() Function The makedate() is a MySQL date/time function. It is used to make the date of the given year and number of days. Syntax select makedate(year, number_of_days); Parameter: Year : 4 digit year to find date Number_of_days : total number of days, should be greater than zero. Returns: This function returns...
1 min read
MySQL From_days() Function The from_days() is a MySQL date/time function. It is used to get the date of the given number of days. Syntax select from_days(numeric_day); Parameter: Numeric: value to convert in date. Example 1 Select from_days(756982); Output: Example 2 Select from_days(456982); Output: TopicMySQL date/time ...
1 min read
MySQL CURRENT_DATE() Function The current_date() is a MySQL date/time function. It is used to get the current date. Syntax select current_date(); Parameters NA Returns The current_date() function returns the current date. It will return the current date as a 'YYYY-MM-DD' format if used in a string context. It will return the current date...
1 min read
MySQL Date/Time quarter() Function The quater() is a MySQL date/time function. It is used to get the quarter portion of the given date/datetime. Syntax select quarter(date_value); Parameter: Date_value : date or datetime for getting quarter value. Returns: This function returns the quarter portion of a date value. Example 1 select quarter('2018-09-28'); Output: Example 2 select quarter('2021-05-20'); Output: TopicMySQL datetime ...
1 min read
MySQL Date/Time minute() Function The minute() is a MySQL date/time function. It is used to get the value of minute from given datetime or time. Syntax ect minute(date_value); Parameter: Date_value: datetime or time value for getting minute. Returns: This function returns the minute portion of a date value. Example 1 select minute('10:18:25.000002'); Output: Example 2 select minute('2018-9-28 10:20:25.000002'); Output: ...
1 min read
MySQL Date/Time Subtime() Function The subtime() is a MySQL date/time function. It is used to get the time/datetime which is subtracted by certain intervals. Syntax select subtime(start_value, time); Parameter: Start_value: time/datetime by which interval is to be subtracted. Time: time in which interval is to be subtracted. Returns This function returns the time/datetime which...
1 min read
MySQL Date/Time Sysdate() Function The sysdate() is a MySQL date/time function. It is used to get the system date. Syntax select sysdate(); Returns This function returns the system date. Example 1 select sysdate(); Output: Example 2 select sysdate()+2; Output: TopicMySQL datetime ...
1 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India