Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - daysbtwdates() return the number of days between two dates http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 daysbtwdates()      Return the number of days between two dates
------------------------------------------------------------------------------
 Declaration
   date.hdr

 Syntax
   func long daysbtwdates extern
   param value date dStart, ;
         value date dEnd

 Arguments
   dStart is the start date of the interval.
   dEnd is the end date of the interval.

 Return
   Number of days between the two dates.

 Description
   The daysbtwdates function returns the number of days between dStart
   and dEnd.

 Example
   #define EXAMPLE_DATE
   #include example.hdr

   proc Test_daysbtwdates
   vardef
      date  dBirth
      date  dToday
      ulong nSecs
   enddef
   dToday := today()
   input "When were you born (mm/dd/yy)? " to dBirth
   nSecs := daysbtwdates( dBirth, dToday ) * 24UL * 60UL * 60UL + seconds()
   ? "You lived", nSecs, "seconds"
   endproc

   proc main
   Test_daysbtwdates()
   endproc

See Also: daysfrom()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson