swirl Guide to OmniMark 6   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
      Other Library Functions  
function   ymdhms-month-difference   Available in:
Professional
Enterprise

Library: omdate - date and time functions
Include: omdate.xin
Return type: Integer
Returns:       

Returns the number of months difference between two specified dates.


Declaration

  define integer function ymdhms-month-difference
                (value stream a, value stream b)


Purpose

This function takes two dates and returns a signed value representing the number of months difference between the two dates. The result is rounded down to the largest number of months less than or equal to the difference. The two specified dates can be in different time zones.

Arguments:

Example:

  include "omdate.xin"
  process
     local integer elapsed-months
     set elapsed-months to ymdhms-month-difference ("19980416155545+0500", "19710401080000+0000")
     output "%d(elapsed-months) months have elapsed between the specified dates/times.%n"
  ; Result of this code:
  ;  324 months have elapsed between the specified dates/times.

        Other Library Functions
   add-to-ymdhms
   arpadate-to-ymdhms
   format-ymdhms
   now-as-ymdhms
   round-down-ymdhms
   round-up-ymdhms
   ymdhms-adjust-time-zone
   ymdhms-day-difference
   ymdhms-julian-day-count
   ymdhms-month-difference
   ymdhms-second-difference
   ymdhms-to-arpadate
   ymd-weekday
 
----  

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ OMX ] [ ERRORS ]

OmniMark 6.5 Documentation Generated: December 23, 2002 at 6:25:49 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-2002.