MySQL Date/Time microsecond() Function17 Mar 2025 | 1 min read The microsecond() is a MySQL date/time function. It is used to get the value of microsecond from given datetime or time. SyntaxParameter:Date_value: datetime or time value for getting microsecond. Returns:This function returns the microsecond portion of a date value. Example 1Output: ![]() Example 2Output: ![]() Next TopicMySQL datetime |
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 monthname() Function The monthname() is a MySQL date/time function. It is used to get the full month name. Syntax select monthname(date_value); Parameter: date_value : datetime or time value for getting month name. Returns: This function returns the full name of the month for a date. Example 1 Select monthname ('2018-9-28 10:20:25.000002'); Output: Example 2 Select monthname('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 time_format() Function The time_format() is a MySQL date/time function. It is used to format the time in specified given format_mask. Syntax select time_format(time, format_mask) Parameter: Time: time to be format Format_mask: format to be applied on time following are the list of options VALUE DESCRIPTION %f Microseconds (000000 to 999999) %f is available starting in...
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 CURDATE() Function The curdate() is a my date/time function. It is used to get the current date. Syntax select curdate(); Parameters NA Returns This function returns the current date. Example 1 Select curdate(); Output: Example 2 Select curdate()+2; Output: TopicMySQL date/time ...
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_FORMAT() Function The date_format() is a MySQL date/time function. It is used to get the date in specified format. Syntax select date_format(date, format_mask) Parameter: Date: date to be formatted Format_mask: format to be applied in date, following is the list of all the formats. Value Description %a Weekday name abbreviated (Sun to Sat) %b Month name abbreviated...
2 min read
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 DATEDIFF() Function The datediff() is a MySQL date/time function. It is used to get the difference between two date values. Syntax select datediff(date1, date2); Parameter: date1 & date2 : date's for calculating the difference. Returns This function returns the difference in days between two date values. Example 1 Select datediff('2018-09-10','2018-09-10'); Output: Example 2 Select datediff('2018-09-10','2018-09-10'); Output: TopicMySQL date/time ...
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