[
https://issues.apache.org/jira/browse/FLINK-6813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
sunjincheng updated FLINK-6813:
-------------------------------
Description:
* Syntax
TIMESTAMPDIFF ( datepart , startdate , enddate )
-datepart
Is the part of startdate and enddate that specifies the type of boundary
crossed.
-startdate
Is an expression that can be resolved to a time, date.
-enddate
Same with startdate.
* Example
SELECT TIMESTAMPDIFF(year, '2015-12-31 23:59:59.9999999', '2017-01-01
00:00:00.0000000') from tab; --> 2
See more:
[https://issues.apache.org/jira/browse/CALCITE-1827|https://issues.apache.org/jira/browse/CALCITE-1827]
was:
* Syntax
DATEDIFF ( datepart , startdate , enddate )
-datepart
Is the part of startdate and enddate that specifies the type of boundary
crossed.
-startdate
Is an expression that can be resolved to a time, date.
-enddate
Same with startdate.
* Example
SELECT DATEDIFF(year, '2015-12-31 23:59:59.9999999', '2017-01-01
00:00:00.0000000') from tab; --> 2
> Add TIMESTAMPDIFF supported in SQL
> ----------------------------------
>
> Key: FLINK-6813
> URL: https://issues.apache.org/jira/browse/FLINK-6813
> Project: Flink
> Issue Type: Sub-task
> Components: Table API & SQL
> Affects Versions: 1.4.0
> Reporter: sunjincheng
> Assignee: sunjincheng
>
> * Syntax
> TIMESTAMPDIFF ( datepart , startdate , enddate )
> -datepart
> Is the part of startdate and enddate that specifies the type of boundary
> crossed.
> -startdate
> Is an expression that can be resolved to a time, date.
> -enddate
> Same with startdate.
> * Example
> SELECT TIMESTAMPDIFF(year, '2015-12-31 23:59:59.9999999', '2017-01-01
> 00:00:00.0000000') from tab; --> 2
> See more:
> [https://issues.apache.org/jira/browse/CALCITE-1827|https://issues.apache.org/jira/browse/CALCITE-1827]
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)