$Time: Difference between revisions

From m204wiki
Jump to navigation Jump to search
($TIME(2,' ',' ') did not format correctly - only spaces work, but we really want nulls)
No edit summary
 
(One intermediate revision by one other user not shown)
Line 14: Line 14:
</tr>
</tr>


<tr><th>time-format</th>
<tr><th rowspan="2">time-format</th>
<td align="right">1</td>
<td>1</td>
<td>Returns the time of day as <code>hhdmmdss</code> (<code>d</code> is the delimiter)</td>
<td>Returns the time of day as <code>hhdmmdss</code> (<code>d</code> is the delimiter)</td>
<td align="right">1</td></tr>
<td align="right">1</td></tr>


<tr><th>&nbsp;</th>
<tr>
<td align="right">2 </td>
<td>2 </td>
<td>Returns the time of day as <code>hhdmmdssdttt</code> (<code>d</code> is the delimiter)</td>
<td>Returns the time of day as <code>hhdmmdssdttt</code> (<code>d</code> is the delimiter)</td>
<td>&nbsp;</td></tr>
<td>&nbsp;</td></tr>
Line 29: Line 29:
<td><b>:</b> (colon)</td></tr>
<td><b>:</b> (colon)</td></tr>


<tr><th>second-delimiter </th>
<tr><th nowrap>second-delimiter </th>
<td>1 character only, second-delimiter</td>
<td>1 character only, second-delimiter</td>
<td>Character to place between time units <var>SS</var> and <var>TTT</var></td>
<td>Character to place between time units <var>SS</var> and <var>TTT</var></td>
Line 37: Line 37:
The second-delimiter applies only if time-format is <code>2</code>. You must enclose the delimiters with single quotation marks.</p>
The second-delimiter applies only if time-format is <code>2</code>. You must enclose the delimiters with single quotation marks.</p>
<p>
<p>
You can suppress either the first-delimiter or second-delimiter character by using a single quoted null string.</p>
You can suppress the first-delimiter or the second-delimiter character by using a single quoted null string. To suppress both delimiters, use two single quoted null strings separated by a comma.</p>


==Examples==
==Examples==
Line 60: Line 60:
<td>HH MM SS</td></tr>
<td>HH MM SS</td></tr>


<tr><td>$Time(1,'') </td>
<tr><td>$Time(1,&apos;&apos;) </td>
<td>HHMMSS</td></tr>
<td>HHMMSS</td></tr>


Line 71: Line 71:
</tr>
</tr>


<tr><td>$Time(2,' ',' ')<--(nulls, not blanks)</td>
<tr><td>$Time(2,&apos;',&apos;')</td>
<td>HHMMSSTTT</td></tr>
<td>HHMMSSTTT</td></tr>
</table>
</table>


[[Category:SOUL $functions]]
[[Category:SOUL $functions]]

Latest revision as of 17:15, 24 April 2017

Returns the current time of day in the format specified.

Syntax

$Time(time-format,'first-delimiter', 'second-delimiter')

Where:

Argument Value Specifies Default value
time-format 1 Returns the time of day as hhdmmdss (d is the delimiter) 1
2 Returns the time of day as hhdmmdssdttt (d is the delimiter)  
first-delimiter 1 character only Character to place between time units HH, MM, and SS : (colon)
second-delimiter 1 character only, second-delimiter Character to place between time units SS and TTT . (period)

The second-delimiter applies only if time-format is 2. You must enclose the delimiters with single quotation marks.

You can suppress the first-delimiter or the second-delimiter character by using a single quoted null string. To suppress both delimiters, use two single quoted null strings separated by a comma.

Examples

$Time(argument) Returns...
$Time HH:MM:SS
$Time(1) HH:MM:SS
$Time(1,'-') HH-MM-SS
$Time(1,' ') HH MM SS
$Time(1,'') HHMMSS
$Time(2) HH:MM:SS.TTT
$Time(2,'-') HH-MM-SS.TTT
$Time(2,'','') HHMMSSTTT