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

now-as-ymdhms

 
 

Library: General, Date and time functions (OMDATE)
Include: omdate.xin
Return type: String
Returns: 

Returns a 19-character string representing the current date and time.


Declaration

  define stream function now-as-ymdhms


Purpose

This function returns a 19-character string of the current date and time in a standard, normalized "YYYYMMDDhhmmss+ZHZM" format.

Example in one line:

     output "Now = " || now-as-ymdhms || "%n"

Working example:

  ; Add one year to the current date 
    include "omdate.xin"
    process
      local stream ymdhms  ; current date
      local integer years-to-add initial {1}
      local stream incremented-date
      set ymdhms to now-as-ymdhms
      set incremented-date to add-to-ymdhms ymdhms years years-to-add
      output "Current date          = " || ymdhms || "%n"
      output "Current date + 1 year = " || incremented-date
  ; Result of this example run on Valentine's Day, 2001:
  ;      Current date          = 20010214155655-0500
  ;      Current date + 1 year = 20020214155655-0500

        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 ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:34 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.