ToDateParser

Emulates Oracle's TO_DATE function.
This class holds and handles the input data form the TO_DATE-method

Methods
static ValueTimestamp toDate(String input, String format)
Parse a string as a date with the given format.
static ValueTimestamp toDate(String input, String format)
Parse a string as a date with the given format.
Parameters:
input - the input
format - the format
Returns:
the date as a timestamp
static ValueTimestamp toTimestamp(String input, String format)
Parse a string as a timestamp with the given format.
static ValueTimestamp toTimestamp(String input, String format)
Parse a string as a timestamp with the given format.
Parameters:
input - the input
format - the format
Returns:
the timestamp
static ValueTimestampTimeZone toTimestampTz(String input, String format)
Parse a string as a timestamp with the given format.
static ValueTimestampTimeZone toTimestampTz(String input, String format)
Parse a string as a timestamp with the given format.
Parameters:
input - the input
format - the format
Returns:
the timestamp
int getCurrentMonth()
int getCurrentMonth()
int getCurrentYear()
int getCurrentYear()
String getFormatStr()
String getFormatStr()
String getFunctionName()
String getFunctionName()
String getInputStr()
String getInputStr()
void remove(String inputFragmentStr, String formatFragment)
Remove a token from a string.
void remove(String inputFragmentStr, String formatFragment)
Remove a token from a string.
Parameters:
inputFragmentStr - the input fragment
formatFragment - the format fragment
void setAbsoluteDay(int absoluteDay)
void setAbsoluteDay(int absoluteDay)
void setAmPm(boolean isAM)
void setAmPm(boolean isAM)
void setBC(boolean bc)
void setBC(boolean bc)
void setDay(int day)
void setDay(int day)
void setDayOfYear(int dayOfYear)
void setDayOfYear(int dayOfYear)
void setHour(int hour)
void setHour(int hour)
void setHour12(int hour12)
void setHour12(int hour12)
void setMinute(int minute)
void setMinute(int minute)
void setMonth(int month)
void setMonth(int month)
void setNanos(int nanos)
void setNanos(int nanos)
void setSecond(int second)
void setSecond(int second)
void setTimeZone(TimeZone timeZone)
void setTimeZone(TimeZone timeZone)
void setTimeZoneHour(int timeZoneHour)
void setTimeZoneHour(int timeZoneHour)
void setTimeZoneMinute(int timeZoneMinute)
void setTimeZoneMinute(int timeZoneMinute)
void setYear(int year)
void setYear(int year)
String toString()
String toString()