VMS Help  —  Lexicals  F$DELTA_TIME
    Returns the time difference between a given start and end time.
    The end time must be the same as or later than the start time.

    Format

      F$DELTA_TIME(start-time,end-time,format)

1  –  Return Value

    A character string containing the difference between the start
    and end times. The returned string has the following fixed
    format:
    dddd hh:mm:ss.cc

2  –  Argument

 start-time

    Absolute time expression of the start time in the following
    format:

    dd-mmm-yyyy hh:mm:ss.cc

 end-time

    Absolute time expression of the end time in the following format:

    dd-mmm-yyyy hh:mm:ss.cc

 format

    Format for delta time return value. The keywords are as follows:

    o  ASCTIM: ASCII time format

    o  DCL: DCL delta time format This format can be used as an input
       to other DCL time-related lexicals and commands.

3  –  Example

  $ START=F$TIME()
  $ END=F$TIME()
  $ SHOW SYMBOL START
   START = "15-JUL-2003 16:26:35.77"
  $ SHOW SYMBOL END
   END = "15-JUL-2003 16:26:41.39"
  $ WRITE SYS$OUTPUT F$DELTA_TIME(START,END)
   0 00:00:05.62

      This example uses the F$TIME() lexical function to define a
      symbol for the start time and end time. It then uses F$DELTA_
      TIME to display the time difference between the start and end
      time.

      This example returns the delta between the start and end time
      in DCL and ASCII formats.

   (WRITE SYS$OUTPUT F$DELTA_TIME ("BOOT", "LOGIN")
     0 10:24:18.92
  $ WRITE SYS$OUTPUT F$DELTA_TIME ("BOOT", "LOGIN", "DCL")
  0-10:24:18.92
  $ WRITE SYS$OUTPUT F$DELTA_TIME ("BOOT", "LOGIN", "ASCTIM")
     0 10:24:18.92)

      This example returns the delta between the boot and login time
      in DCL and ASCII formats.
Close Help