TimeStringConvert (String function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
Line 5: Line 5:
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%outString</th><td>string</td></tr>
<tr><th>%outString</th>
<td>This string is the method object, <var class="term">string</var>, converted to the format in <var class="term">outputFormat</var>.</td></tr>
<tr><th>string</th>
<tr><th>string</th>
<td>string</td></tr>
<td>A datetime string.</td></tr>
<tr><th>inputFormat</th>
<tr><th>inputFormat</th>
<td>string</td></tr>
<td>The datetime format of the method object <var class="term">string</var>.</td></tr>
<tr><th>outputFormat</th>
<tr><th>outputFormat</th>
<td>string</td></tr>
<td>A string that is the format to which the method object is to be converted.</td></tr>
<tr><th><var>CentSpan</var></th>
<tr><th><var>CentSpan</var></th>
<td>See the <var>[[CENTSPAN parameter|CENTSPAN]]</var> parameter. </td></tr>
<td>See the <var>[[CENTSPAN parameter|CENTSPAN]]</var> parameter. </td></tr>
Line 17: Line 18:


==Usage notes==
==Usage notes==
==Examples==
==Examples==
<p class="code">%result = (%timestamp):timeStringConvert('YYYYMMDDHHMISSIIIIII', 'HH:MI:SS Mon DD, YYYY') </p>
==See also==
==See also==
{{Template:String:TimeStringConvert footer}}
{{Template:String:TimeStringConvert footer}}

Revision as of 14:57, 3 April 2012

Convert date/time string from one format to another (String class)

[Introduced in Sirius Mods 7.9]


Syntax

%outString = string:TimeStringConvert( inputFormat, outputFormat, - [[CentSpan=] number]) Throws InvalidDateString

Syntax terms

%outString This string is the method object, string, converted to the format in outputFormat.
string A datetime string.
inputFormat The datetime format of the method object string.
outputFormat A string that is the format to which the method object is to be converted.
CentSpan See the CENTSPAN parameter.

Usage notes

Examples

%result = (%timestamp):timeStringConvert('YYYYMMDDHHMISSIIIIII', 'HH:MI:SS Mon DD, YYYY')

See also