Package org.h2.mode
Class ToDateParser
java.lang.Object
org.h2.mode.ToDateParser
Emulates Oracle's TO_DATE function.
This class holds and handles the input data form the TO_DATE-method
This class holds and handles the input data form the TO_DATE-method
-
Method Summary
Modifier and TypeMethodDescriptionstatic ValueTimestamptoDate(SessionLocal session, String input, String format) Parse a string as a date with the given format.toString()static ValueTimestamptoTimestamp(SessionLocal session, String input, String format) Parse a string as a timestamp with the given format.static ValueTimestampTimeZonetoTimestampTz(SessionLocal session, String input, String format) Parse a string as a timestamp with the given format.
-
Method Details
-
toString
-
toTimestamp
Parse a string as a timestamp with the given format.- Parameters:
session- the database sessioninput- the inputformat- the format- Returns:
- the timestamp
-
toTimestampTz
public static ValueTimestampTimeZone toTimestampTz(SessionLocal session, String input, String format) Parse a string as a timestamp with the given format.- Parameters:
session- the database sessioninput- the inputformat- the format- Returns:
- the timestamp
-
toDate
Parse a string as a date with the given format.- Parameters:
session- the database sessioninput- the inputformat- the format- Returns:
- the date as a timestamp
-