Skip to content

[3pt] SQL datetime support (in 2.10) #2575

Closed
@patiencedaur

Description

@patiencedaur

Epic: Datetime remaining issues

Product: Tarantool
Since: 2.10
Audience/target: dev

Root document: https://www.tarantool.io/en/doc/latest/reference/reference_sql/

SME: @ ImeevMA , @ tsafin

Dev. issue: tarantool/tarantool#6773

Documents with the input info:

Below are contents of issues #2833 and #2832.


NOW()

Issue #2832.

The NOW() function returns the current date and time as a DATETIME
value. If this function is called more than once in a query, it returns
the same result until the query completes, unless a yield has occurred.
On yield the value returned by NOW() changes.
Requested by @ImeevMA in tarantool/tarantool@0243cdc.

DATE_PART()

Issue #2833.

The DATE_PART() function returns the requested information from a
DATETIME value. It takes two arguments, the first one tells us what
information is being requested, the second is a DATETIME value. Here is
a list of supported values of the first argument and what information is
returned:
'millennium' - milennium
'century' - century
'decade' - decade
'year' - year
'quarter' - quarter of year
'month' - month of year
'week' - week of year
'day' - day of month
'dow' - day of week
'doy' - day of year
'hour' - hour of day
'minute' - minute of hour
'second' - second of min
'millisecond' - millisecond of second
'microsecond' - microsecond of second
'nanosecond' - nanosecond of second
'epoch' - epoch
'timezone_offset' - timezone offset
Requested by @ImeevMA in tarantool/tarantool@90951de.

Metadata

Metadata

Assignees

Labels

datetimefeatureA new functionalitysql[location] SQL manual

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions