$Time: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (more conversion cleanup) |
||
Line 1: | Line 1: | ||
< | <p> | ||
Returns the current time of day in the format specified.</p> | |||
<p class=" | ==Syntax== | ||
<p class="syntax">$Time(<span class="term">time-format,'first-delimiter', 'second-delimiter'</span>) | |||
</p> | </p> | ||
Where: | |||
<table> | <table> | ||
<tr class="head"> | <tr class="head"> | ||
Line 13: | Line 13: | ||
<th>Default value</th> | <th>Default value</th> | ||
</tr> | </tr> | ||
<tr> | |||
< | <tr><th>time-format</th> | ||
<td align="right">1</td> | <td align="right">1</td> | ||
<td>Returns the time of day as hhdmmdss (d | <td>Returns the time of day as <code>hhdmmdss</code> (<code>d</code> is the delimiter)</td> | ||
<td align="right">1</td> | <td align="right">1</td></tr> | ||
</tr> | |||
<tr> | <tr><th> </th> | ||
< | |||
<td align="right">2 </td> | <td align="right">2 </td> | ||
<td>Returns the time of day as hhdmmdssdttt (d | <td>Returns the time of day as <code>hhdmmdssdttt</code> (<code>d</code> is the delimiter)</td> | ||
<td> </td> | <td> </td></tr> | ||
</tr> | |||
<tr> | <tr><th>first-delimiter </th> | ||
< | |||
<td>1 character only </td> | <td>1 character only </td> | ||
<td>Character to place between time units HH, MM, and SS</td> | <td>Character to place between time units <var>HH</var>, <var>MM</var>, and <var>SS</var></td> | ||
<td>: (colon)</td> | <td><b>:</b> (colon)</td></tr> | ||
</tr> | |||
<tr> | <tr><th>second-delimiter </th> | ||
< | |||
<td>1 character only, second-delimiter</td> | <td>1 character only, second-delimiter</td> | ||
<td>Character to place between time units SS and TTT</td> | <td>Character to place between time units <var>SS</var> and <var>TTT</var></td> | ||
<td>. (period)</td> | <td><b>.</b> (period)</td></tr> | ||
</tr> | |||
</table> | </table> | ||
<p>The second-delimiter applies only if time-format is 2. 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> | The second-delimiter applies only if time-format is <code>2</code>. You must enclose the delimiters with single quotation marks.</p> | ||
<p> | |||
You can suppress either the first-delimiter or second-delimiter character by using a single quoted null string.</p> | |||
==Examples== | |||
<table> | <table> | ||
<tr class="head"> | <tr class="head"> | ||
Line 46: | Line 45: | ||
<th>Returns...</th> | <th>Returns...</th> | ||
</tr> | </tr> | ||
<tr> | |||
<td>$Time</td> | <tr><td>$Time</td> | ||
<td>HH:MM:SS</td> | <td>HH:MM:SS</td> | ||
</tr> | </tr> | ||
<tr> | |||
<td>$Time(1) </td> | <tr><td>$Time(1) </td> | ||
<td>HH:MM:SS</td> | <td>HH:MM:SS</td> | ||
</tr> | </tr> | ||
<tr> | |||
<td>$Time(1,'-') </td> | <tr><td>$Time(1,'-') </td> | ||
<td>HH-MM-SS</td> | <td>HH-MM-SS</td></tr> | ||
</tr> | |||
<tr> | <tr><td>$Time(1,' ') </td> | ||
<td>$Time(1,' ') </td> | <td>HH MM SS</td></tr> | ||
<td>HH MM SS</td> | |||
</tr> | <tr><td>$Time(1,'') </td> | ||
<tr> | <td>HHMMSS</td></tr> | ||
<td>$Time(1,'') </td> | |||
<td>HHMMSS</td> | <tr><td>$Time(2) </td> | ||
</tr> | |||
<tr> | |||
<td>$Time(2) </td> | |||
<td>HH:MM:SS.TTT</td> | <td>HH:MM:SS.TTT</td> | ||
</tr> | </tr> | ||
<tr> | |||
<td>$Time(2,'-') </td> | <tr><td>$Time(2,'-') </td> | ||
<td>HH-MM-SS.TTT</td> | <td>HH-MM-SS.TTT</td> | ||
</tr> | </tr> | ||
<tr> | |||
<td>$Time(2,'','') </td> | <tr><td>$Time(2,'','') </td> | ||
<td>HHMMSSTTT</td> | <td>HHMMSSTTT</td></tr> | ||
</tr> | |||
</table> | </table> | ||
[[Category:SOUL $functions]] | [[Category:SOUL $functions]] |
Revision as of 17:10, 26 February 2015
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 either the first-delimiter or second-delimiter character by using a single quoted null string.
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 |