$Sir DateFmt: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
Line 48: Line 48:
<li>[[Sir2000 User Language Tools]]</li>
<li>[[Sir2000 User Language Tools]]</li>
</ul>
</ul>
<p class="caption">Products authorizing $Sir_DateFmt
<p>
</p>
</p>


[[Category:$Functions|$Sir_DateFmt]]
[[Category:$Functions|$Sir_DateFmt]]

Revision as of 19:28, 25 October 2012

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" />

Syntax terms

%tst Set to 1 if fmt is a valid datetime format string, otherwise set to 0.
fmt Datetime format string. Refer to "Datetime string formats" for an explanation of valid datetime format strings.

Usage notes

  • This $function has no error conditions.

Example

The following fragment prints the string Good:

%x = $Sir_DateFmt('CYYDDDHHMISSXXX') If %x = 1 Then Print 'Good' Else Print 'Bad' End If


Products authorizing $Sir_DateFmt