ANSI SQL DATETIME标准格式掩码

The ANSI SQL standards specify qualifiers and formats for character representations of DATETIME and INTERVAL values. The standard qualifier for a DATETIME value is YEAR TO SECOND, and the standard format is as follows:
YYYY-MM-DD HH:MM:SS
The standards for an INTERVAL value specify the following two classes of intervals:
  • The YEAR TO MONTH class has the format: YYYY-MM

    A subset of this format is also valid: for example, just a month interval.

  • The DAY TO FRACTION class has the format: DD HH:MM:SS.F

    Any subset of contiguous fields is also valid: for example, MINUTE TO FRACTION.

posted @ 2023-01-27 11:30  zhjh256  阅读(51)  评论(0编辑  收藏  举报