$Sir DateFmt: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:$Sir_DateFmt}} | {{DISPLAYTITLE:$Sir_DateFmt}} | ||
<span class="pageSubtitle" | <span class="pageSubtitle">Validate datetime format</span> | ||
<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the $Sir_DateFmt function.</p> | <p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the $Sir_DateFmt function.</p> |
Revision as of 21:21, 22 November 2011
Validate datetime format
Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the $Sir_DateFmt function.
The $Sir_DateFmt function expects a datetime format string and returns the value 1 if the datetime format is valid, else the value 0.
Syntax
<section begin="syntax" /> %tst = $Sir_DateFmt(fmt) <section end="syntax" />
where
fmt | datetime format string. Refer to for an explanation of valid datetime format strings. |
---|---|
%tst | set to 1 if fmt is a valid datetime format string, otherwise set to 0. |
For example, the following fragment prints the string Good:
%X = $Sir_DateFmt('CYYDDDHHMISSXXX') IF %X = 1 THEN PRINT 'Good' ELSE PRINT 'Bad' END IF
This $function has no error conditions.