From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,5c7411e3cf60a1d7 X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,5c7411e3cf60a1d7 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-01-05 13:31:49 PST Xref: gmd.de comp.os.vms:38125 comp.sys.dec:12702 Path: gmd.de!xlink.net!howland.reston.ans.net!pipex!uknet!miclon!nreadwin From: nreadwin@micrognosis.co.uk (Neil Readwin) Newsgroups: comp.os.vms,comp.sys.dec Subject: Re: need help using RTL time functions Date: 5 Jan 1994 21:05:47 GMT Organization: Micrognosis, a division of CSK(UK) Ltd Message-ID: <2gfa3b$gjl@zeus.london.micrognosis.com> References: NNTP-Posting-Host: moria.micrognosis.co.uk ah301@yfn.ysu.edu (Jerry Sy) writes: |> can anybody tell me what I am doing wrong ? Times are quadwords, not longs, so this won't work on a VAX. Try ... #include stdlib #include time #include string #include descrip #include libdtdef unsigned long result,operation,delta_min; unsigned long qDateA[2],qDateB[2],qDateDiff[2]; main() { $DESCRIPTOR(dateA, "28-DEC-1993 07:00:00.00"); $DESCRIPTOR(dateB, "28-DEC-1993 07:30:00.00"); result=lib$convert_date_string(&dateB,&qDateB); result=lib$convert_date_string(&dateA,&qDateA); result=lib$sub_times(&qDateB,&qDateA,&qDateDiff); operation=LIB$K_DELTA_MINUTES; result=lib$cvt_from_internal_time(&operation,&delta_min,&qDateDiff); } -- Phone: +44 71 815 5283 E-mail: nreadwin@micrognosis.co.uk Anything is a cause for sorrow that my mind or body has made