Database Date-time functions

Source: Internet
Author: User
Tags month name

Surdate (), Current_date ()

Returns the current date

Curtime (), Current_time

Return Current time

Now (), Current_timestamp (), localtime (), Sysdate (), Localtimestamp ()

Returns the current date and time

Year (d),

Returns the year value in Date D

Month (d)

Returns the month value in Date D

Day (d)

Returns the date value in Date D

MonthName (d)

Returns the month name in the date,

Dayname (d)

Return Date D is the day of the week

DayOfWeek (d)

Date d today is the day of the week, 1 is Monday, 2 is Tuesday

Weekday (d)

Date d days is the day of the week, 0 is Monday, 2 is Tuesday

Week (d), WeekOfYear (d)

Calculated Date d is the week ordinal of the year, the range is 0->53

DayOfYear (d)

Calculated Date D is the day ordinal of this year

DayOfMonth (d)

Calculated Date D is the day of the month

Quarter (d)

Return Date D is the first season, return 1->4

Hour (t)

Return the time value on the way

Minute (t)

Returns the minute value in T

Second (t)

Returns the seconds value in T

Database Date-time functions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.