[
https://issues.apache.org/jira/browse/FLINK-36941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17907287#comment-17907287
]
Yiyu Tian commented on FLINK-36941:
-----------------------------------
Verifying in the code that,
DATE_FORMAT(timestamp, string) eventually calls formatTimestamp(TimestampData
ts, String format, ZoneId zoneId) in DateTimeUtils.java, which uses
[DateTimeFormatter|[https://github.com/apache/flink/blob/1523f2c2062b860a2abfe75f8ead276bb161d64a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/DateTimeUtils.java#L724]].
DATE_FORMAT(string, string) eventually calls
formatTimestampStringWithOffset(
String dateStr, String fromFormat, String toFormat, TimeZone tz, long
offsetMills) in DateTimeUtils.java, which uses
[SimpleDateFormat|https://github.com/apache/flink/blob/1523f2c2062b860a2abfe75f8ead276bb161d64a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/DateTimeUtils.java#L743].
> Fix Doc for DATE_FORMAT
> -----------------------
>
> Key: FLINK-36941
> URL: https://issues.apache.org/jira/browse/FLINK-36941
> Project: Flink
> Issue Type: Bug
> Components: Documentation
> Reporter: Yiyu Tian
> Priority: Major
>
> The documentation for DATE_FORMAT is outdated.
> https://github.com/apache/flink/blob/6951686be5691dc855b6d07d575535ac239670da/docs/data/sql_functions.yml#L645
--
This message was sent by Atlassian Jira
(v8.20.10#820010)