$DateJ: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (misc cleanup)
m (misc formatting)
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
The <var>$DateJ</var> function returns the current Julian date as a 5- to 7-character string in one of these formats: </p>
The <var>$DateJ</var> function returns the current Julian date as a 5- to 7-character string in one of these formats: </p>
<ul>
<ul>
<li><var>YY-DDD</var>, format, for example, <code>97-342</code></li>
<li>YY-DDD, format, for example, <code>97-342</code></li>


<li><var>CYY-DDD</var> format, for example, <code>097-342</code></li>
<li>CYY-DDD format, for example, <code>097-342</code></li>


<li><var>YYYY-DDD</var> format, for example, <code>1997-342</code></li>
<li>YYYY-DDD format, for example, <code>1997-342</code></li>
</ul>
</ul>
<p>
<p>
Line 13: Line 13:
==Usage==
==Usage==
<p>
<p>
When using <var>$DateJ</var> in field values, make sure that all values of <var>$DateJ</var> are in the same format. You get incorrect results when sorting records if you mix <var>YYYY</var>, <var>CYY</var>, and <var>YY</var> formats.  </p>
When using <var>$DateJ</var> in field values, make sure that all values of <var>$DateJ</var> are in the same format. You get incorrect results when sorting records if you mix YYYY, CYY, and YY formats.  </p>


==Syntax==
==Syntax==
<p>
<p>
The format for <var>$DateJ</var> is:</p>
The format for <var>$DateJ</var> is:</p>
<p class="syntax">$DATEJ(<span class="term">year-format</span>, <span class="term">fill-character</span>)
<p class="syntax">$DateJ(<span class="term">year-format</span>, <span class="term">fill-character</span>)
</p>
</p>
<p>
<p>
For further syntax details, see [[Overview of $DATE functions#Overview of $DATE functions|Overview of $DATE functions]]. </p>
For further syntax details, see [[Overview of $Date functions]]. </p>
<p>
<p>
If <var class="product">Model&nbsp;204</var> encounters an error, the function returns all asterisks (<tt>*</tt>).</p>
If <var class="product">Model&nbsp;204</var> encounters an error, the function returns all asterisks (<tt>*</tt>).</p>


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

Latest revision as of 21:03, 6 October 2015

The $DateJ function returns the current Julian date as a 5- to 7-character string in one of these formats:

  • YY-DDD, format, for example, 97-342
  • CYY-DDD format, for example, 097-342
  • YYYY-DDD format, for example, 1997-342

The default is five characters. If $DateJ is stored as a field value, you can use this form to sort records chronologically.

Usage

When using $DateJ in field values, make sure that all values of $DateJ are in the same format. You get incorrect results when sorting records if you mix YYYY, CYY, and YY formats.

Syntax

The format for $DateJ is:

$DateJ(year-format, fill-character)

For further syntax details, see Overview of $Date functions.

If Model 204 encounters an error, the function returns all asterisks (*).