Set Milliseconds Method The Set Milliseconds method sets the millisecond of a

Set milliseconds method the set milliseconds method

This preview shows page 138 - 141 out of 334 pages.

Set Milliseconds Method The Set Milliseconds method sets the millisecond of a date object to a date expressed in milliseconds relative to the system time. The value of dateVar becomes equivalent to the number of milliseconds from the time on the system clock. You can use a positive number for a later time and a negative number for an earlier time. Format dateVar. setMilliseconds( millisecond ) Table 68 describes the arguments for the Set Milliseconds method. Example The following example accepts a number of milliseconds as input and converts it to the date relative to the date and time in the computer clock: function test2_Click () { var aDate = new Date; var milli = 7200000; aDate.setMilliseconds(milli); var aYear = aDate.getFullYear(); var aMonth = aDate.getMonth() + 1; var aDay = aDate.getDate(); var anHour = aDate.getHours(); switch(anHour) { case 0: anHour = " 12 midnight."; Table 67. Arguments for the Set Hours Method Argument Description hour For more information, see “Values for Dates and Times” on page 125 . minute second millisecond Table 68. Arguments of the Set Milliseconds Method Argument Description millisecond For more information, see “Values for Dates and Times” on page 125 .
Image of page 138
Methods Reference Date and Time Methods Siebel eScript Language Reference Version 8.1, Rev. A 139 break; case 12: anHour = " 12 noon."; break; default: if (anHour > 11 ) anHour = (anHour - 12 ) + " P.M."; else anHour = anHour + " A.M."; } TheApplication().RaiseErrorText("The specified date is " + aMonth + "/" + aDay + "/" + aYear + " at " + anHour); } The number 7200000 milliseconds is two hours. If you run this code on November 22, 2005 between 3 P.M. and 4 P.M., then it provides the following result: The specified date is 11/22/2005 at 5 P.M. Set Minutes Method The Set Minutes method sets the minute of dateVar to the value you specify in the minute argument. You can optionally set the minute argument to a specific second and millisecond. For more information, see “Values for Dates and Times” on page 125 . Format dateVar. setMinutes( minute [, second [, millisecond ]]) Table 69 describes the arguments for the Set Minutes method. Set Month Method The Set Month method sets the month of dateVar to the value you specify in the month argument. You can optionally set the day of month to the date argument. For more information, see “Values for Dates and Times” on page 125 . Table 69. Arguments for the Set Minutes Method Argument Description minute For more information, see “Values for Dates and Times” on page 125 . second millisecond
Image of page 139
Siebel eScript Language Reference Version 8.1, Rev. A Methods Reference Date and Time Methods 140 Format dateVar .setMonth( month [, date ]) Table 70 describes the arguments for the Set Month method. Set Seconds Method The Set Seconds method sets the second of dateVar to the value you specify in the second argument. You can optionally use this method to set the second argument to the value that you specify in the millisecond argument.
Image of page 140
Image of page 141

You've reached the end of your free preview.

Want to read all 334 pages?

  • Summer '16
  • Oracle
  • Type system, Siebel, Siebel eScript

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors