JavaScript API for Oracle type TIMESTAMP.

Hierarchy

  • IOracleTimestamp

Constructors

Methods

  • Convert to a IOracleTimestampTZ in the specified time zone. The time zone string has to contain either a time zone offset of the form '(+|-)HH:MM' or a time zone region name.

    Parameters

    • timezone: string

      The time zone string.

    Returns IOracleTimestampTZ

  • Parse a string into an IOracleTimestamp. An optional datetime format model and an optional NLS parameter string can be provided. If no format model is specified, the string must be in the default format for the Oracle TIMESTAMP data type, which is determined by the NLS_TIMESTAMP_FORMAT parameter.

    If an NLS parameter string is specified, it has the effect of temporarily altering the session's NLS settings for the duration of the call to this method. The NLS parameter string may set the NLS_DATE_LANGUAGE parameter.

    If a datetime format model is specified, it overrides the datetime format determined by NLS settings (i.e. the setting of the NLS_TIMESTAMP FORMAT parameter).

    Returns

    a IOracleTimestamp object

    Parameters

    • date: string

      date represented as a string

    • Optional format: string

      optional datetime format model

    • Optional nlsParam: string

      optional NLS parameter string. Must have the same format as the NLS argument to the TO_TIMESTAMP SQL function.

    Returns any

  • Gets the day component in the Gregorian calendar.

    Returns

    day component as number

    Returns number

  • Gets the hour component.

    Returns

    hour component as number

    Returns number

  • Gets the minute component.

    Returns

    minute component as number

    Returns number

  • Gets the month component in the Gregorian calendar.

    Returns

    month component as number

    Returns number

  • Gets the second component, including the fractional part.

    Returns

    second component as number

    Returns number

  • Gets the year component in the Gregorian calendar.

    Returns

    year component as number

    Returns number

  • Converts the given datetime to a string in a certain format. An optional datetime format model and an optional NLS parameter string can be provided. If no format model and/or no NLS parameter string is provided, the respective default values for the session are used.

    If an NLS parameter string is specified, it has the effect of temporarily altering the session's NLS settings for the duration of the call to this method. The NLS parameter string may set the NLS_DATE_LANGUAGE parameter.

    If a datetime format model is specified, it overrides the datetime format determined by NLS settings.

    Returns

    a string of the timestamp

    Parameters

    • Optional format: string

      datetime format model

    • Optional nlsParam: string

      optional NLS parameter string

    Returns string