OpenVMS Source Code Demos
calc_date_time_diff_001.com
$!===========================================================
$! title : CALC_DATE_TIME_DIFF_001.com
$! author : Neil Rieck
$! created : 2019-01-28
$! purpose : compute the difference between two dates in DCL
$! caveat : cannot be used when times cross a year boundary
$! platform: VMS on VAX; OpenVMS on Alpha; OpenVMS on Itanium
$!===========================================================
$ say :== write sys$output
$ say "-i-time1: ",f$cvtime()
$ time1 = f$cvtime(,,"SECONDOFYEAR")
$ wait 0:0:03
$ say "-i-time2: ",f$cvtime()
$ time2 = f$cvtime(,,"SECONDOFYEAR")
$ say "-i-diff : ",(time2-time1)," seconds"
$ say "-i-diff : ",(time2-time1)/60," minutes"
Back to
Home
Neil Rieck
Waterloo, Ontario, Canada.