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)
The following table describes the arguments for the Clib Get Date and Time method.
Argument | Description |
---|---|
Time |
A time object. |
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
For more information, see the following topics: