$Sir Date: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
(Automatically generated page update)
Line 39: Line 39:
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[http://m204wiki.rocketsoftware.com/images/4/4a/JoclrNew.pdf Janus Open Client]</li>
<li>[http://m204wiki.rocketsoftware.com/images/4/4a/JoclrNew.pdf Janus Open Client]</li>
<li>[[Janus Open Server]]</li>
<li>[http://m204wiki.rocketsoftware.com/images/1/17/JosrvrNew.pdf Janus Open Server]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Janus Web Server]]</li>

Revision as of 00:32, 13 September 2013

Get current datetime

Note: Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent of $Sir_Date is CurrentTimeString.

This function accepts an optional datetime format string and an optional error control string, and returns the current date and time as a character string with the specified format.

Syntax

%odate = $Sir_Date(fmt, errctl)

Syntax terms

%odate Set to contain the current date and time, in the format specified by fmt.
fmt Optional datetime format string, defaults to 'YY-MM-DD'. Refer to "Datetime string formats" for an explanation of valid datetime formats and valid datetime values.
errctl Optional error control string; refer to "Datetime error handling".

Usage notes

  • $Sir_Date returns the null string in the following error case: fmt is not a valid datetime format. For more information about error handling, see "Datetime error handling").

Example

The following fragment prints a value such as Monday, 1 January 2001 AT 01:11:10 PM:

Print $Sir_Date('Wkday, DAY Month YYYY' WITH ' "A"T HH:MI:SS AM')

Products authorizing $Sir_Date