function
Library: Date and time functions (OMDATE)
Include: omdate.xin |
Returns: the specified date in the indicated format |
define string function format-ymdhms value string date-format with-date value string ymdhms
Argument definitions
Use format-ymdhms
to take a date/time in YYYYMMDDhhmmss+ZHZM
format and convert it to a
string
, using the format operations of the OmniMark date
operator to guide the conversion.
This example program uses format-ymdhms
to format a date for output:
include "omdate.xin" process output format-ymdhms "Now == =W, =xD =n =xY, =h:=m:=s =a.m. =t%n" with-date now-as-ymdhmsRunning this example might yield output such as
Now = Thursday, 31 October 2019, 03:47:35 p.m. -0400
To use format-ymdhms
, you must include the following code near the top of your program:
include "omdate.xin"