Siebel eScript Language Reference > Methods Reference > Date and Time Methods >

Overview of Date Methods


Siebel eScript provides the following ways to work with dates:

  • The standard date object in JavaScript.
  • The Clib object that implements routines from the C programming language. For more information, see C Language Library Reference.

The following methods convert dates in the format of one date system to the format of the other date system:

  • Date.fromSystem
  • Date.toSystem

This chapter describes the JavaScript Date object.

To indicate the name of a variable that you create to hold a date value, this chapter uses dateVar.

Format for Calling a Date Method

To call a date method, you must precede the method name with a specific instance of a variable followed by a period. For example, assume you create a date object named aDate. To call the getDate method, you use the following format:

aDate.getDate

Siebel CRM uses a literal value to call a static method, such as Date.parse. The beginning of a static method includes the following format:

Date.

These methods are part of the date object instead of an instance of the Date object.

Caution About Using Two Digit Dates

Siebel eScript uses the ECMAScript standard for two digit dates, which might be different from the formats that other applications use, including Siebel CRM.

CAUTION:  To prevent a year 2000 (Y2K) problem, avoid using a two digit date in your Siebel eScript code.

Values for Dates and Times

Table 61 describes values for months, days, hours, minutes, and seconds. Many Siebel eScript objects use these same values.

Table 61. Values for Months, Days, Hours, Minutes, and Seconds
Time Period
Description

month

A month, specified as an integer from 0 to 11. January is 0 and December is 11.

day

A day of the month, specified as an integer from 1 to 31. The first day of the month is 1. The last day of the month is 28, 29, 30, or 31.

hours

An hour, specified as an integer from 0 to 23. Midnight is 0 and 11 PM is 23.

minutes

A minute, specified as an integer from 0 to 59. The first minute of an hour is 0 and the last minute of an hour is 59.

seconds

A second, specified as an integer from 0 to 59. The first second of a minute is 0 and the last second of a minute is 59.

millisecond

A millisecond, specified as an integer from 0 through 999. The first millisecond is 0 and the last millisecond is 999.

Siebel eScript Language Reference Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.