(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of vms_lib, prev: DATE_TIME, next: DAY_OF_WEEK)


DAY - Day Number Returned as a Longword Integer


Format:
    number_of_days, day_time = vms_lib.day ([user-time])
Returns:
number_of_days
The number of days since the system zero date
('17-NOV-1858 00:00:00.00').
day_time
The number of 10-millisecond units since midnight of the user_time argument.
Arguments:
user-time
64-bit system time - a Python long integer.
See GENMAN 'Programming', 'special OpenVMS datatypes' for details.
If the argument is not present or None, then the current date + time is used.
Examples:
>>> import vms_lib
>>> import vms_sys

>>> binary_time = vms_sys.bintim ('29-FEB-2000 01:02:03.04')
>>> binary_time
44585029230400000L

>>> number_of_days, day_time = vms_lib.day (binary_time)
>>> number_of_days
51603
>>> day_time
372304

>>> vms_lib.day (binary_time)
(51603, 372304)

>>> vms_lib.day (vms_sys.gettim ())
(51037, 5151320)

>>> vms_lib.day ()
(51037, 5152244)

>>> vms_lib.day (None)
(51037, 5153719)

>>> vms_lib.day ('A')
Traceback (innermost last):
  File "<stdin>", line 1, in ?
TypeError: argument 1: must be long integer or None

>>> vms_lib.day ('A','B')
Traceback (innermost last):
  File "<stdin>", line 1, in ?
TypeError: function requires at most 1 argument; 2 given
>>>

(go to: table of contents, index, list of vms_lib, prev: DATE_TIME, next: DAY_OF_WEEK)

01-DEC-1998 ZE.