Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: nreadwin@micrognosis.co.uk (Neil Readwin)
Subject: Re: need help using RTL time functions
Date: 5 Jan 1994 21:05:47 GMT	[thread overview]
Message-ID: <2gfa3b$gjl@zeus.london.micrognosis.com> (raw)
In-Reply-To: ah301-050194132027@sy_j.pgh.wec.com

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


  reply	other threads:[~1994-01-05 21:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-01-05 18:20 need help using RTL time functions Jerry Sy
1994-01-05 21:05 ` Neil Readwin [this message]
1994-01-05 21:22 ` Pat Rankin
1994-01-06  4:53 ` Carl J Lydick
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox