$Sir DateFmt: Difference between revisions
Jump to navigation
Jump to search
(Automatically generated page update) |
m (link repair) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
<span class="pageSubtitle">Validate datetime format</span> | <span class="pageSubtitle">Validate datetime format</span> | ||
<p class="warn"><b>Note: </b> | <p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the $Sir_DateFmt function.</p> | ||
The <var>$Sir_DateFmt</var> function expects a datetime format string and returns the value 1 if the datetime format is valid, else the value 0. | The <var>$Sir_DateFmt</var> function expects a datetime format string and returns the value 1 if the datetime format is valid, else the value 0. | ||
Line 11: | Line 11: | ||
===Syntax terms=== | ===Syntax terms=== | ||
<table> | |||
<table | |||
<tr><th>%tst</th> | <tr><th>%tst</th> | ||
<td>Set to 1 if <var class="term">fmt</var> is a valid datetime format string, otherwise set to 0. | <td>Set to 1 if <var class="term">fmt</var> is a valid datetime format string, otherwise set to 0. | ||
</td></tr> | </td></tr> | ||
<tr><th>fmt</th> | <tr><th>fmt</th> | ||
<td>Datetime format string. Refer to [[Datetime string formats | <td>Datetime format string. Refer to [[Datetime string formats]] for an explanation of valid datetime format strings.</td></tr> | ||
</table> | </table> | ||
Line 41: | Line 41: | ||
<li>[[Fast/Unload User Language Interface]]</li> | <li>[[Fast/Unload User Language Interface]]</li> | ||
<li>[[Media:JoclrNew.pdf|Janus Open Client]]</li> | <li>[[Media:JoclrNew.pdf|Janus Open Client]]</li> | ||
<li>[ | <li>[[Media:JosrvrNew.pdf|Janus Open Server]]</li> | ||
<li>[[Janus Sockets]]</li> | <li>[[Janus Sockets]]</li> | ||
<li>[[Janus Web Server]]</li> | <li>[[Janus Web Server]]</li> | ||
<li>Japanese functions</li> | <li>Japanese functions</li> | ||
<li>[ | <li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li> | ||
<li>[ | <li>[[Sir2000 User Language Tools]]</li> | ||
</ul> | </ul> | ||
[[Category:$Functions|$Sir_DateFmt]] | [[Category:$Functions|$Sir_DateFmt]] |
Latest revision as of 22:49, 8 February 2018
Validate datetime format
Note: Many $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
%tst = $Sir_DateFmt(fmt)
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