public final class DateTimeFormatFunction extends FunctionN
| Modifier and Type | Field and Description |
|---|---|
static int |
FORMATDATETIME
FORMATDATETIME() (non-standard).
|
static int |
PARSEDATETIME
PARSEDATETIME() (non-standard).
|
args, argsCount, typeAUTO_PARENTHESES, MAP_IN_AGGREGATE, MAP_IN_WINDOW, MAP_INITIAL, WITH_PARENTHESES, WITHOUT_PARENTHESESADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS| Constructor and Description |
|---|
DateTimeFormatFunction(int function) |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
formatDateTime(SessionLocal session,
Value date,
java.lang.String format,
java.lang.String locale,
java.lang.String timeZone)
Formats a date using a format string.
|
java.lang.String |
getName()
Get the name.
|
Value |
getValue(SessionLocal session,
Value v1,
Value v2,
Value v3)
Returns the value of this function.
|
Expression |
optimize(SessionLocal session)
Try to optimize the expression.
|
static ValueTimestampTimeZone |
parseDateTime(SessionLocal session,
java.lang.String date,
java.lang.String format,
java.lang.String locale,
java.lang.String timeZone)
Parses a date using a format string.
|
getUnenclosedSQL, getValueaddParameter, doneWithParameters, getCost, getSubexpression, getSubexpressionCount, getType, isEverything, mapColumns, optimizeArguments, setEvaluatable, updateAggregateaddFilterConditions, createIndexConditions, getAlias, getBooleanValue, getColumnName, getColumnNameForView, getEnclosedSQL, getNonAliasExpression, getNotIfPossible, getNullable, getSchemaName, getSQL, getSQL, getSQL, getSQL, getTableAlias, getTableName, getWhenSQL, getWhenValue, isConstant, isIdentity, isNullConstant, isValueSet, isWhenConditionOperand, needParentheses, optimizeCondition, toString, writeExpressions, writeExpressionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetTraceSQLpublic static final int FORMATDATETIME
public static final int PARSEDATETIME
public Value getValue(SessionLocal session, Value v1, Value v2, Value v3)
FunctionNpublic static java.lang.String formatDateTime(SessionLocal session, Value date, java.lang.String format, java.lang.String locale, java.lang.String timeZone)
session - the sessiondate - the date to formatformat - the format stringlocale - the localetimeZone - the time zonepublic static ValueTimestampTimeZone parseDateTime(SessionLocal session, java.lang.String date, java.lang.String format, java.lang.String locale, java.lang.String timeZone)
session - the sessiondate - the date to parseformat - the parsing formatlocale - the localetimeZone - the time zonepublic Expression optimize(SessionLocal session)
Expressionoptimize in class Expressionsession - the sessionpublic java.lang.String getName()
NamedExpression