Class CompiledDateTimeFormat
java.lang.Object
org.apache.calcite.util.format.postgresql.CompiledDateTimeFormat
Contains a parsed date/time format. Able to parse a string into a date/time value,
 or convert a date/time value to a string.
- 
Constructor SummaryConstructorsConstructorDescriptionCompiledDateTimeFormat(com.google.common.collect.ImmutableList<CompiledItem> compiledItems) 
- 
Method SummaryModifier and TypeMethodDescriptionformatDateTime(ZonedDateTime dateTime, Locale locale) Converts a date/time value to a string.parseDateTime(String input, ZoneId zoneId, Locale locale) Parses a date/time value from a string.
- 
Constructor Details- 
CompiledDateTimeFormat
 
- 
- 
Method Details- 
parseDateTimepublic ZonedDateTime parseDateTime(String input, ZoneId zoneId, Locale locale) throws ParseException Parses a date/time value from a string. The format used is in compiledItems.- Parameters:
- input- the String to parse
- zoneId- timezone to convert the result to
- locale- Locale to use for parsing day or month names if the TM modifier was present
- Returns:
- the parsed date/time value
- Throws:
- ParseException- if the string to parse did not meet the required format
 
- 
formatDateTimeConverts a date/time value to a string. The output format is in compiledItems.- Parameters:
- dateTime- date/time value to convert
- locale- Locale to use for outputting day and month names if the TM modifier was present
- Returns:
- the date/time value formatted as a String
 
 
-