Example The following example uses the Clib Convert Time Object to Integer

Example the following example uses the clib convert

This preview shows page 278 - 281 out of 334 pages.

Example The following example uses the Clib Convert Time Object to Integer method to format a time so that Siebel eScript can use it with the Clib Get Difference in Seconds method: // create time object and set time to midnight: var midnightObject = Clib.localtime(Clib.time()); midnightObject.tm_hour = 0; midnightObject.tm_min = 0; midnightObject.tm_sec = 0; // use mktime to convert Time object to integer: var midnight = Clib.mktime(midnightObject); // difftime can now use this value: var diff = Clib.difftime(Clib.time(), midnight); TheApplication().Trace("Seconds since midnight: " + diff); This example produces the following result: COMMENT,Seconds since midnight: 59627 For an example that describes the difference between the formats that asctime and mktime use, see “Clib Get Date and Time Method” on page 279 . Related Topics For more information, see the following topics: “Get Day of Month Method” on page 132 “Get Time Method” on page 135 “Get UTC Day of Month Method” on page 144 Table 177. Arguments for the Clib Convert Time Object to Integer Method Argument Description Time A time object.
Image of page 278
C Language Library Reference Clib Date and Time Methods Siebel eScript Language Reference Version 8.1, Rev. A 279 Clib Get Date and Time Method The Clib Get Date and Time method returns a string that includes the date and time that it extracts from a time object. The string it returns uses the following format: Day Mon dd hh:mm:ss yyyy For example, Wed Aug 10 13:21:56 2005 . Format Clib.asctime( Time ) Table 178 describes the arguments for the Clib Get Date and Time method. Example The following example describes the difference between the asctime and mkdir formats for time: TheApplication().TraceOn("c:\\eScript_trace.txt","allocation","all"); var tm = Clib.localtime(Clib.time()); var tmStr = Clib.asctime(tm); var tmVal = Clib.mktime(tm); TheApplication().Trace("Time String : " + tmStr); TheApplication().Trace("Time Value : " + tmVal); TheApplication().TraceOff(); This example produces the following result: 03/05/04,12:26:30,START,7.5.3 [16157] LANG_INDEPENDENT,SADMIN,6532,6584 03/05/04,12:26:30,COMMENT,"Time String : Fri Mar 05 12:26:30 2004" 03/05/04,12:26:30,COMMENT,Time Value : 1078489590 03/05/04,12:26:30,STOP Related Topics For more information, see the following topics: “Get Day of Month Method” on page 132 “Get Time Method” on page 135 “Get UTC Day of Month Method” on page 144 Table 178. Arguments for the Clib Get Date and Time Method Argument Description Time A time object.
Image of page 279
Siebel eScript Language Reference Version 8.1, Rev. A C Language Library Reference Clib Date and Time Methods 280 Clib Get Formatted Date and Time Method The Clib Get Formatted Date and Time method creates a string that includes the date, time, or the date and time. It returns a formatted string that contains these values. Format Clib.strftime( stringVar, formatString, Time ) Table 179 describes the arguments for the Clib Get Formatted Date and Time method.
Image of page 280
Image of page 281

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