Class DateTimeObject
- All Implemented Interfaces:
IObject,IFunctionConstants
-
Field Summary
Fields inherited from interface quadbase.util.IFunctionConstants
ABS, ACOS, ADD, ADDTIME, AM_PM, AND, ASIN, ATAN, ATAN2, AVERAGE, B_COL, BOOL, BOOL_FUNC, BOOL_NAME, CALENDAR_CONST, CEIL, COL, COS, COUNT, CURRDATE, CURRDATETIME, CURRTIME, D_COL, DATE, DATE_FUNC, DATE_NAME, DATETIME, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, DAYDIFF, DAYOFWEEK, DECL, DIVIDE, E, EQUALS, ERA, EXP, FACTORIAL, FALSE, FLOOR, GETAMPM, GETERA, GETMONTH, GREATER, GREATEREQUAL, HOUR, HOUR_OF_DAY, ID, IEEEREMAINDER, IFELSE_B, IFELSE_D, IFELSE_N, IFELSE_S, INDEXOF, INSERT, LASTINDEXOF, LESS, LESSEQUAL, LOG, MAX, MAXLENGTH, MEDIAN, MILLISECOND, MIN, MINUTE, MOD, MONTH, MULTIPLY, N_COL, NAND, NEW_DATE_NAME, NEW_NUM_NAME, NEW_STR_NAME, NOR, NOT, NUM, NUM_FUNC, NUM_NAME, OR, OTHER_FUNC_NAME, PAGE, PARAM, PI, POW, PRINTDATE, PRINTDATETIME, PRINTTIME, RANDOM, REPLACE, RINT, ROLLTIME, S_COL, SECOND, SIN, SQRT, STDDEV, STR, STR_FUNC, STR_NAME, STRCAT, STRLEN, SUBSTRING, SUBTRACT, SUMSQUARE, TAN, TD_FUNC_NAME, THIS, TODATE, TODEGREES, TOLOWERCASE, TONUMERIC, TORADIANS, TOSTRING, TOTALPAGES, TOTALSECTIONS, TOUPPERCASE, TRUE, VARIANCE, WEEK_OF_MONTH, WEEK_OF_YEAR, WITHIN, XNOR, XOR, YEAR -
Constructor Summary
ConstructorsModifierConstructorDescriptionDateTimeObject(String date) Creates a new DateTimeObject using specified StringprotectedDateTimeObject(String formula, int sqlType) Creates a new DateTimeObject using specified formula and SQL typeDateTimeObject(Date date) Creates a new DateTimeObject using specified DateDateTimeObject(StringObject date) Creates a new DateTimeObject using specified StringObject -
Method Summary
Modifier and TypeMethodDescriptionstatic DateTimeObjectadd(DateTimeObject date, short calendarField, NumericObject amt) Add amt to Calendar Field part of the Datestatic StringObjectgetAmPm(DateTimeObject date) Returns AM or PM depending on the time of the DateTimeObjectstatic DateTimeObjectgetColumnValue(int colInfoIndex) Gets the column value at specified columnstatic DateTimeObjectgetColumnValue(int colInfoIndex, int sqlType) Gets the column value at specified columnstatic DateTimeObjectgetColumnValue(int colInfoIndex, short aggregation) Gets the column value at specified column after applying specified aggregation.static DateTimeObjectgetColumnValue(int colInfoIndex, short aggregation, int sqlType) Gets the column value at specified column after applying specified aggregation.static DateTimeObjectgetColumnValue(NumericObject colInfoIndex, int sqlType) Gets the column value at specified columnstatic DateTimeObjectgetColumnValue(NumericObject colInfoIndex, short aggregation, int sqlType) Gets the column value at specified column after applying specified aggregation.static DateTimeObjectReturns the current datestatic DateTimeObjectReturns the current date and timestatic DateTimeObjectReturns the current timestatic NumericObjectgetDateTime(DateTimeObject date, short calendarField) Gets the value of a specified field from the DateTimeObjectstatic NumericObjectgetDayDifference(DateTimeObject date1, DateTimeObject date2) Returns the difference in number of days between the two DateTimeObjectsstatic StringObjectgetDayOfWeek(DateTimeObject date) Returns the day of the weekstatic StringObjectgetERA(DateTimeObject date) Returns the ERA of the DateTimeObjectReturns the formulastatic StringObjectgetMonth(DateTimeObject date) Returns the monthintReturns the SQL typestatic StringObjectprintDate(DateTimeObject date) Prints the datestatic StringObjectprintDate(DateTimeObject date, StringObject pattern) Prints the date in the specified formatstatic StringObjectprintDateTime(DateTimeObject date) Prints the date and timestatic StringObjectprintDateTime(DateTimeObject date, StringObject pattern) Prints the date and time in the specified formatstatic StringObjectprintTime(DateTimeObject date) Prints the timestatic StringObjectprintTime(DateTimeObject date, StringObject pattern) Prints the time in the specified formatstatic DateTimeObjectroll(DateTimeObject date, short calendarField, NumericObject amt) Rolls amt to the Calendar Field part of Date.
-
Constructor Details
-
DateTimeObject
Creates a new DateTimeObject using specified String -
DateTimeObject
Creates a new DateTimeObject using specified StringObject -
DateTimeObject
Creates a new DateTimeObject using specified Date -
DateTimeObject
Creates a new DateTimeObject using specified formula and SQL type
-
-
Method Details
-
getFormula
Returns the formula- Specified by:
getFormulain interfaceIObject
-
getSQLType
public int getSQLType()Returns the SQL type- Specified by:
getSQLTypein interfaceIObject
-
getColumnValue
Gets the column value at specified column -
getColumnValue
Gets the column value at specified column -
getColumnValue
Gets the column value at specified column -
getColumnValue
Gets the column value at specified column after applying specified aggregation. List of possible aggregations is in @link quadbase.reportdesigner.util.IAggregateConstants -
getColumnValue
Gets the column value at specified column after applying specified aggregation. List of possible aggregations is in @link quadbase.reportdesigner.util.IAggregateConstants -
getColumnValue
public static DateTimeObject getColumnValue(NumericObject colInfoIndex, short aggregation, int sqlType) Gets the column value at specified column after applying specified aggregation. List of possible aggregations is in @link quadbase.reportdesigner.util.IAggregateConstants -
getCurrentDateTime
Returns the current date and time -
getCurrentDate
Returns the current date -
getCurrentTime
Returns the current time -
add
Add amt to Calendar Field part of the DateCalendar Field : quadbase.reportdesigner.util.IFunctionConstants.ERA quadbase.reportdesigner.util.IFunctionConstants.YEAR quadbase.reportdesigner.util.IFunctionConstants.MONTH quadbase.reportdesigner.util.IFunctionConstants.WEEK_OF_YEAR quadbase.reportdesigner.util.IFunctionConstants.WEEK_OF_MONTH quadbase.reportdesigner.util.IFunctionConstants.DATE quadbase.reportdesigner.util.IFunctionConstants.DAY_OF_MONTH quadbase.reportdesigner.util.IFunctionConstants.DAY_OF_YEAR quadbase.reportdesigner.util.IFunctionConstants.DAY_OF_WEEK quadbase.reportdesigner.util.IFunctionConstants.DAY_OF_WEEK_IN_MONTH quadbase.reportdesigner.util.IFunctionConstants.AM_PM quadbase.reportdesigner.util.IFunctionConstants.HOUR quadbase.reportdesigner.util.IFunctionConstants.HOUR_OF_DAY quadbase.reportdesigner.util.IFunctionConstants.MINUTE quadbase.reportdesigner.util.IFunctionConstants.SECOND quadbase.reportdesigner.util.IFunctionConstants.MILLISECOND
- See Also:
-
roll
Rolls amt to the Calendar Field part of Date. Note that here except for the Calendar Field of the Date, no other field is affected. In event of an overflow, the field rolls over -
getDateTime
Gets the value of a specified field from the DateTimeObject -
getDayDifference
Returns the difference in number of days between the two DateTimeObjects -
getDayOfWeek
Returns the day of the week -
getMonth
Returns the month -
getAmPm
Returns AM or PM depending on the time of the DateTimeObject -
getERA
Returns the ERA of the DateTimeObject -
printDateTime
Prints the date and time -
printDateTime
Prints the date and time in the specified format -
printTime
Prints the time -
printTime
Prints the time in the specified format -
printDate
Prints the date -
printDate
Prints the date in the specified format
-