The Convert Date to Integer method converts a date object to a system time

The convert date to integer method converts a date

This preview shows page 129 - 132 out of 334 pages.

The Convert Date to Integer method converts a date object to a system time format that is in the same format as the format that the Clib Convert Time to Integer method returns. To create a date object from a variable in system time format, see “Get Day of Week Method” on page 132 . Format Date.toSystem() Example The following example converts a date object to a system format that methods of the Clib object can use: var SysDate = objDate.toSystem(); Convert Date String to Date Object Method The Convert Date String to Date Object method converts a date string to a date object. It returns a date object that includes the date in the dateString argument. Format Date.parse( dateString ) Table 63 describes the arguments for the Convert Date String to Date Object method. Table 63. Arguments for the Convert Date String to Date Object Method Argument Description dateString A string that uses the following format: weekday, Month dd, yyyy hh:mm:ss
Image of page 129
Siebel eScript Language Reference Version 8.1, Rev. A Methods Reference Date and Time Methods 130 Usage To call the Convert Date String to Date Object method, you use the date constructor rather than a variable. You must use the following format: Friday, October 31, 1998 15:30:00 -0800 where: The last number in the string is the offset from Greenwich mean time. The following items use this format: The dateVar .toGMTString method Email applications Internet applications You can omit the day of the week, time zone, time specification, and seconds field. For example, consider the following code: var aDate = Date.parse( dateString ); This code is equivalent to the following code: var aDate = new Date( dateString ); Example The following example results in a value of 9098766000: var aDate = Date.parse("Friday, October 31, 1998 15:30:00 -0220"); TheApplication().RaiseErrorText(aDate); Convert Date to GMT String Method The Convert Date to GMT String method converts a date object to a string according to Greenwich mean time. It returns the date that Siebel CRM sets in dateVar. It returns this date as a string in the following format: Day Mon dd hh:mm:ss yyyy GMT. Format dateVar .toGMTString() Example The following example accepts a number of milliseconds as input and converts it to GMT time as the number of milliseconds before or after the time on the computer clock: function clickme_Click () { var aDate = new Date; var milli = 200000;
Image of page 130
Methods Reference Date and Time Methods Siebel eScript Language Reference Version 8.1, Rev. A 131 aDate.setUTCMilliseconds(milli); TheApplication().RaiseErrorText(aDate.toGMTString()); } Related Topics For more information, see the following topics: “Clib Get Date and Time Method” on page 279 “Convert UTC Date to Readable Date Method” on page 143 Convert Integer Date to JavaScript Date Method The Convert Integer Date to JavaScript Date method converts a time from the format that the Clib Convert Time to Integer method returns to a standard JavaScript date object. To call the Convert Integer Date to JavaScript Date method, you use the date constructor rather than a variable.
Image of page 131
Image of page 132

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