(go to: table of contents, index, list of vms_sys, prev: ASCUTC, next: BINUTC)
BINTIM - Convert ASCII String to Binary Time
Format:
27-SEP-1998 ZE.
timadr = vms_sys.bintim (timbuf)
Returns:
See GENMAN 'Programming',
'special OpenVMS datatypes'
for details.
Examples:
>>> import vms_sys
>>> vms_sys.bintim ('29-FEB-2000 12:34:56.78')
44585444967800000L
>>> vms_sys.asctim (44585444967800000L)
'29-FEB-2000 12:34:56.78'
>>> vms_sys.bintim ('0 01:03:04.45')
-37844500000L
>>> vms_sys.asctim (-37844500000L)
' 0 01:03:04.45'
>>> vms_sys.bintim ()
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: function requires exactly 1 argument; 0 given
>>> vms_sys.bintim (None)
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: argument 1: expected read-only buffer, None found
# that means 'string' ----------^^^^^^^^^^^^^^^^
>>> vms_sys.bintim ('INVALID')
Traceback (innermost last):
File "<stdin>", line 1, in ?
vms_sys.error: (388, '%SYSTEM-F-IVTIME, invalid time')
>>> vms_sys.bintim (1)
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: argument 1: expected read-only buffer, int found
# that means 'string' ----------^^^^^^^^^^^^^^^^
>>>
(go to: table of contents,
index,
list of vms_sys,
prev: ASCUTC,
next: BINUTC)