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

Set Date Method


The Set Date method sets the day of dateVar to the value you specify in the dayOfMonth argument.

Format

dateVar.setDate(dayOfMonth)

Table 64 describes the arguments for the Set Date method.

Table 64. Arguments for the Set Date Method
Argument
Description

dayOfMonth

The day of the month to set in dateVar as an integer from 1 through 31. For more information, see Values for Dates and Times.

Setting the Day to a Value That Exceeds 31

You can add any number of days to a date. Siebel eScript automatically converts the number of days to the correct month and year. For example, to add the number of days to a date, you can use the following script:

//script to add 7 days to a date

var dtNextWeek = new Date();

dtNextWeek.setDate( dtNextWeek.getDate()+7 );

//script to add 76 days to a date

var dtNextWeek = new Date();

dtNextWeek.setDate(dtNextWeek.getDate()+76);

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