Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!pasteur!ucbvax!DRCVAX.ARPA!graham From: graham@DRCVAX.ARPA Newsgroups: comp.os.vms Subject: RE: Printing file age from DCL Message-ID: <8802152352.AA08946@ucbvax.Berkeley.EDU> Date: 11 Feb 88 18:03:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Organization: The Internet Lines: 22 Many have asked this question before. As far as I know, there isn't an easy, or difficult way to add or subtract times and dates from DCL. The VAX stores dates and times in a quadword format. Basically, the quadword is the number of 100 millisecond chunks since midnight, 17 November 1858. (Don't ask!) It would be simplicity itself to write a brief FORTRAN program to subtract dates so you could have file age. You need the use of three system services/RTL routines: 1. SYS$BINTIM to translate the date strings into quadword format 2. LIB$SUBX to subtract the two quadwords 3. SYS$ASCTIM to convert the resulting quadword into a string Remember that delta times use negative values. hope this helps a little, Dan Graham ------