(go to: table of contents, index, list of vms_sys, prev: ASCEFC, next: ASCTOID)
ASCTIM - Convert Binary Time to ASCII String
Format:
27-SEP-1998 ZE.
timbuf = vms_sys.asctim (timadr [,cvtflg])
Returns:
Arguments:
Examples:
See GENMAN 'Programming',
'special OpenVMS datatypes'
for details.
>>> import vms_sys
>>> vms_sys.asctim ()
'12-AUG-1998 10:32:12.47'
>>> vms_sys.asctim (None)
'12-AUG-1998 10:32:17.69'
>>> vms_sys.asctim (None,0)
'12-AUG-1998 10:32:47.51'
>>> vms_sys.asctim (None,1)
'10:33:01.12'
>>> vms_sys.asctim (0x009A0070B0CB6D60L)
'28-MAR-1996 20:50:41.59'
>>> print 0x009A0070B0CB6D60L
43347630415900000L
>>> vms_sys.asctim (43347630415900000L, 0)
'28-MAR-1996 20:50:41.59'
>>> vms_sys.asctim (0x009A0070B0CB6D60L, 1)
'20:50:41.59'
>>> vms_sys.asctim (0x009A0070B0CB6D60L, None)
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: illegal argument type for built-in operation
>>> vms_sys.asctim ('0x009A0070B0CB6D60L', 1)
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: argument 1: timadr - must be long integer
>>> vms_sys.asctim ('string')
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: argument 1: timadr - must be long integer
>>> # this is only an integer, not a long integer
>>> vms_sys.asctim (0x12345)
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: argument 1: timadr - must be long integer
(go to: table of contents,
index,
list of vms_sys,
prev: ASCEFC,
next: ASCTOID)