Siebel eScript Language Reference > Siebel eScript Commands > The Clib Object Time Methods >

Clib.strftime() Method

This method creates a string that describes the date or the time or both, and stores it in a variable.


Clib.strftime(stringVar, formatString, Time)



A variable to hold the string representation of the time


A string that describes how the value stored in stringVar is formatted, using the conversion characters listed in the Usage topic


A time object as returned by Clib.localtime()


A formatted string as described by formatString.


For details on the Time object, read The Time Object. The following conversion characters are used with Clib.strftime() to indicate time and date output:



Abbreviated weekday name (Sun)


Full weekday name (Sunday)


Abbreviated month name (Dec)


Full month name (December)


Date and time (Dec 2 06:55:15 1979)


Two-digit day of the month (02)


Two-digit hour of the 24-hour day (06)


Two-digit hour of the 12-hour day (06)


Three-digit day of the year from 001 (335)


Two-digit month of the year from 01 (12)


Two-digit minute of the hour (55)


AM or PM (AM)


Two-digit seconds of the minute (15)


Two-digit week of the year where Sunday is the first day of the week (48)


Day of the week where Sunday is 0 (0)


Two-digit week of the year where Monday is the first day of the week (47)


The date (Dec 2 1979)


The time (06:55:15)


Two-digit year of the century (79)


The year (1979)


The name of the time zone, if known (EST)


The percent character (%)


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",

See Also

Clib.asctime() Method
Clib.localtime() Method

Siebel eScript Language Reference