Conversion Characters That the Return Formatted Date and Time Method Uses Table

Conversion characters that the return formatted date

This preview shows page 280 - 283 out of 334 pages.

Conversion Characters That the Return Formatted Date and Time Method Uses Table 180 describes conversion characters that the Return Formatted Date and Time method uses. Table 179. Arguments for the Clib Get Formatted Date and Time Method Argument Description stringVar A variable that holds the time in a string. formatString A string that describes how to format the value in the stringVar argument. Conversion characters represent this format. For more information, see “Conversion Characters That the Return Formatted Date and Time Method Uses” on page 280 . Time A time object that the Clib Convert Integer to Local Time method returns. For more information on the time object, see “Overview of Clib Date and Time Methods” on page 274 . Table 180. Conversion Characters That the Return Formatted Date and Time Method Uses Character Description Example %a Abbreviated weekday name. Sun %A Full weekday name. Sunday %b Abbreviated month name. Dec %B Full month name. December %c Date and time. Dec 2 06:55:15 1979 %d Two digit day of the month. 02 %H Two digit hour of the 24-hour day. 06 %I Two digit hour of the 12-hour day. 06 %j Three digit day of the year from 001. 335 %m Two digit month of the year from 01. 12 %M Two digit minute of the hour. 55
Image of page 280
C Language Library Reference Clib Date and Time Methods Siebel eScript Language Reference Version 8.1, Rev. A 281 Example 1 The following example displays the full day name and month name of the current day: var TimeBuf; Clib.strftime(TimeBuf,"Today is %A, and the month is %B", Clib.localtime(Clib.time())); TheApplication().RaiseErrorText(TimeBuf); The display is similar to the following: Today is Friday, and the month is July Example 2 The following example uses various conversion characters to format the value that the Clib Get Formatted Date and Time method returns: TheApplication().TraceOn("c:\\eScript_trace.txt","allocation","all"); var tm, tmStrFmt; tm = Clib.localtime(Clib.time()); Clib.strftime(tmStrFmt, "%m/%d/%Y",tm); TheApplication().Trace("Time String Format: " + tmStrFmt); Clib.strftime(tmStrFmt, "%A %B %d, %Y",tm); TheApplication().Trace("Time String Format: " + tmStrFmt); TheApplication().TraceOff(); %p AM or PM. AM %S Two digit seconds of the minute. 15 %U Two digit week of the year where Sunday is the first day of the week. 48 %w Day of the week where Sunday is 0. 0 %W Two digit week of the year where Monday is the first day of the week. 47 %x The date. Dec 2 1979 %X The time. 06:55:15 %y Two digit year of the century. 79 %Y The year. 1979 %Z The name of the time zone, if known. EST %% The percentage symbol. % Table 180. Conversion Characters That the Return Formatted Date and Time Method Uses Character Description Example
Image of page 281
Siebel eScript Language Reference Version 8.1, Rev. A C Language Library Reference Clib Date and Time Methods 282 This example produces the following result: 03/05/04,12:44:01,START,7.5.3 [16157] LANG_INDEPENDENT,SADMIN,6848,6708 03/05/04,12:44:01,COMMENT,Time String Format: 03/05/2004 03/05/04,12:44:01,COMMENT,"Time String Format: Friday March 05, 2004" 03/05/04,12:44:01,STOP Clib Get Local Date and Time Method The Clib Get Local Date and Time method returns a string that includes the date and time, adjusted for the local time zone. It is equivalent to the following code: Clib.asctime(Clib.localtime(
Image of page 282
Image of page 283

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

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes