Package org.h2.mode
Class ToDateParser
- java.lang.Object
-
- org.h2.mode.ToDateParser
-
public final class ToDateParser extends java.lang.ObjectEmulates Oracle's TO_DATE function.
This class holds and handles the input data form the TO_DATE-method
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ValueTimestamptoDate(SessionLocal session, java.lang.String input, java.lang.String format)Parse a string as a date with the given format.java.lang.StringtoString()static ValueTimestamptoTimestamp(SessionLocal session, java.lang.String input, java.lang.String format)Parse a string as a timestamp with the given format.static ValueTimestampTimeZonetoTimestampTz(SessionLocal session, java.lang.String input, java.lang.String format)Parse a string as a timestamp with the given format.
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toTimestamp
public static ValueTimestamp toTimestamp(SessionLocal session, java.lang.String input, java.lang.String format)
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, java.lang.String input, java.lang.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
public static ValueTimestamp toDate(SessionLocal session, java.lang.String input, java.lang.String format)
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
-
-