MySQL Date/Time minute() Function17 Mar 2025 | 1 min read The minute() is a MySQL date/time function. It is used to get the value of minute from given datetime or time. SyntaxParameter:Date_value: datetime or time value for getting minute. Returns:This function returns the minute portion of a date value. Example 1Output: ![]() Example 2Output: ![]() Next TopicMySQL datetime |
MySQL Date/Time weekday() Function The weekday() is a MySQL date/time function. It is used to get the index for a date. Syntax select weekday(date_value); Parameter: Date_value : date for getting weekday Returns: This function returns the weekday index for a date. Example 1 select weekday('2018-10-03'); Output: Example 2 select weekday('1995-02-11'); Output: TopicMySQL datetime ...
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 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
MySQL Date/Time second() Function The second() is a MySQL date/time function. It is used to get the second portion from the given date/datetime. Syntax select second(date_value); Parameter: date_value : date/datetime value for getting second. Returns: This function returns the second portion of a date value. Example 1 Select second('2018-09-29 01:21:24.000002'); Output: Example 2 select second('02:25:24.000004'); Output: TopicMySQL datetime ...
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 CURRENT_TIMESTAMP() Function The current_timestamp() is a MySQL date/time function. It is used to get the current date and time. Syntax select current_timestamp(); Parameter NA Returns The current_timestamp function returns the current date and time. It will return the current date as a 'YYYY-MM-DD HH:MM:SS' format if used in a string context. It...
1 min read
MySQL Date/Time to_day() Function The to_days() is a MySQL date/time function. It is used to convert the date into numeric number of days. Syntax select to_days(date); Parameter: Date : date to be converted into number of days. Example 1 select to_Days('2018-10-03'); Output: Example 2 select to_Days('1995-02-11'); Output: TopicMySQL datetime ...
1 min read
MySQL Date/Time period_add() Function The period_add() is a MySQL date/time function. This function adds the given number of month in the given period in the formate YYMM or YYYYMM. Syntax select period_add(period, number); Parameter: Period : period value in formate YYMM or YYYYMM Number: number of months to be added in period. Returns: This...
1 min read
MySQL Date/Time sec_to_time() Function The sec_to_time() is a MySQL date/time function. It is used to convert the given second into time. Syntax select sec_to_time(second); Parameter: Second : second value to get time. Example 1 select sec_to_time(2000); Output: Example 2 select sec_to_time(40); Output: TopicMySQL datetime ...
1 min read
MySQL DATE_ADD() Function The date_add() is a MySQL date/time function. It is used to get the date in which some date/datetime intervals are added. Syntax select date_add(date, interval value unit); Parameter: Date: date in which interval will be added Value: date/time intervals Unit: type of interval which are as following: Unit Compatibility MICROSECOND 4.1.1+ SECOND 3.2.3+ MINUTE 3.2.3+ HOUR 3.2.3+ DAY 3.2.3+ WEEK 5+ MONTH 3.2.3+ QUARTER 5+ YEAR 3.2.3+ SECOND_MICROSECOND 4.1.1+ MINUTE_MICROSECOND 4.1.1+ MINUTE_SECOND 4.1.1+ HOUR_MICROSECOND 4.1.1+ HOUR_SECOND 4.1.1+ HOUR_MINUTE 3.2.3+ DAY_MICROSECOND 4.1.1+ DAY_SECOND 3.2.3+ DAY_MINUTE 3.2.3+ DAY_HOUR 3.2.3+ YEAR_MONTH 3.2.3+ Returns This function will return...
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