[
https://issues.apache.org/jira/browse/FLINK-28929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Flink Jira Bot updated FLINK-28929:
-----------------------------------
Labels: pull-request-available stale-assigned (was: pull-request-available)
I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help
the community manage its development. I see this issue is assigned but has not
received an update in 30 days, so it has been labeled "stale-assigned".
If you are still working on the issue, please remove the label and add a
comment updating the community on your progress. If this issue is waiting on
feedback, please consider this a reminder to the committer/reviewer. Flink is a
very active project, and so we appreciate your patience.
If you are no longer working on the issue, please unassign yourself so someone
else may work on it.
> Add built-in datediff function.
> -------------------------------
>
> Key: FLINK-28929
> URL: https://issues.apache.org/jira/browse/FLINK-28929
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / API
> Affects Versions: 1.17.0
> Reporter: Jacky Lau
> Assignee: Jacky Lau
> Priority: Major
> Labels: pull-request-available, stale-assigned
> Fix For: 1.18.0
>
>
> Syntax:
> {code:java}
> DATEDIFF(expr1,expr2){code}
> Returns:
> returns _{{expr1}}_ − _{{expr2}}_ expressed as a value in days from one date
> to the other. _{{expr1}}_ and _{{expr2}}_ are date or date-and-time
> expressions. Only the date parts of the values are used in the calculation.
> This function returns {{NULL}} if _{{expr1}}_ or _{{expr2}}_ is {{{}NULL{}}}.
> Examples:
> {code:java}
> > SELECT DATEDIFF('2007-12-31 23:59:59','2007-12-30');
> -> 1
> > SELECT DATEDIFF('2010-11-30 23:59:59','2010-12-31');
> -> -31{code}
> See more:
> * mysql:
> [https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_datediff]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)