swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
    Other Library Functions  
function  

ymdhms-second-difference

 
 

Library: Date and time functions (OMDATE)
Include: omdate.xin
Return type: Integer

Returns: Returns the number of seconds difference between two specified dates.


Declaration

define integer function ymdhms-second-difference
            (value string a, value string b)

Argument definitions

a
the first date/time in a "YYYYMMDDhhmmss+ZHZM" format
b
the second date/time, also in a "YYYYMMDDhhmmss+ZHZM" format


Purpose

This function takes two date/time strings and returns the number of seconds difference between them. The two dates can be in different time zones.

Example:


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

      Other Library Functions
 
 

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

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:38:10 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.