Details
-
Sub-task
-
Status: In Progress
-
Major
-
Resolution: Unresolved
-
1.4.0
-
None
Description
STR_TO_DATE(str,format) This is the inverse of the DATE_FORMAT() function. It takes a string str and a format string format. STR_TO_DATE() returns a DATETIME value if the format string contains both date and time parts, or a DATE or TIME value if the string contains only date or time parts. If the date, time, or datetime value extracted from str is illegal, STR_TO_DATE() returns NULL and produces a warning.
- Syntax:
STR_TO_DATE(str,format)
- Arguments
**str: -
**format: -
- Return Types
DATAETIME/DATE/TIME
- Example:
STR_TO_DATE('01,5,2013','%d,%m,%Y') -> '2013-05-01'
SELECT STR_TO_DATE('a09:30:17','a%h:%i:%s') -> '09:30:17'
- See more:
Attachments
Issue Links
- blocks
-
FLINK-6976 Add STR_TO_DATE supported in TableAPI
- Open
-
FLINK-9864 Make timestamp extraction more flexible in SQL Client
- Closed
- is blocked by
-
FLINK-7036 Type cast in ExpressionReducer's reduce broke CodeGen's compile stage
- Resolved
- links to