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

Clib.asctime() Method


This method returns a string representing the date and time extracted from a Time object.

Syntax

Clib.asctime(Time)

Parameter
Description

Time

A Time object

Returns

A string representing the date and time extracted from a Time object.

Usage

For details on the Time object, see Time Objects. The returned string has the format Day Mon dd hh:mm:ss yyyy; for example, Wed Aug 10 13:21:56 2005.

Example

This script shows the difference between 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();

The script produces trace output similar to the following.

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

See Also

Clib.div() Method and Clib.ldiv() Method
Clib.gmtime() Method
Clib.localtime() Method
Clib.mktime() Method
getDate() Method
getTime() Method
getUTCDate() Method

Siebel eScript Language Reference Copyright © 2007, Oracle. All rights reserved.