Package org.apache.calcite.runtime
Class SqlFunctions.DateFormatFunction
java.lang.Object
org.apache.calcite.runtime.SqlFunctions.DateFormatFunction
- Enclosing class:
SqlFunctions
State for
FORMAT_DATE
, FORMAT_TIMESTAMP
,
FORMAT_DATETIME
, FORMAT_TIME
, TO_CHAR
functions.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionformatDate
(String fmtString, int date) formatTime
(String fmtString, int time) formatTimestamp
(String fmtString, long timestamp) int
long
toTimestamp
(String timestampString, String fmtString) protected final void
withElements
(FormatModel formatModel, String format, Consumer<List<FormatElement>> consumer) Given a format string and a format model, calls an action with the list of elements obtained by parsing that format string.
-
Constructor Details
-
DateFormatFunction
public DateFormatFunction()
-
-
Method Details
-
withElements
protected final void withElements(FormatModel formatModel, String format, Consumer<List<FormatElement>> consumer) Given a format string and a format model, calls an action with the list of elements obtained by parsing that format string. -
formatTimestamp
-
toChar
-
toDate
-
toTimestamp
-
formatDate
-
formatTime
-