forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: chenxiaoxiong <chenxiaoxiong@huawei.com> Co-committed-by: chenxiaoxiong <chenxiaoxiong@huawei.com>
176 lines
16 KiB
HTML
176 lines
16 KiB
HTML
<a name="dataartsstudio_01_0496"></a><a name="dataartsstudio_01_0496"></a>
|
|
|
|
<h1 class="topictitle1">Date and Time Mode</h1>
|
|
<div id="body8662426"><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p186205514437">The date and time in the EL expression can be displayed in a user-specified format. The date and time format is specified by the date and time mode character string. The date and time mode character string consists of letters from A to Z and from a to z, as shown in <a href="#dataartsstudio_01_0496__en-us_topic_0132998733_table5464612155214">Table 1</a>.</p>
|
|
|
|
<div class="tablenoborder"><a name="dataartsstudio_01_0496__en-us_topic_0132998733_table5464612155214"></a><a name="en-us_topic_0132998733_table5464612155214"></a><table cellpadding="4" cellspacing="0" summary="" id="dataartsstudio_01_0496__en-us_topic_0132998733_table5464612155214" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Letter description</caption><thead align="left"><tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row24646122529"><th align="left" class="cellrowborder" valign="top" width="27.272727272727277%" id="mcps1.3.2.2.4.1.1"><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p04641212165215">Letter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="39.3939393939394%" id="mcps1.3.2.2.4.1.2"><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p246491255210">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.333333333333336%" id="mcps1.3.2.2.4.1.3"><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p44641712195210">Example</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row9464181210525"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p8464171225211">G</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p17464141218524">Epoch</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p446491210524">AD</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row2464112175216"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p8464012175211">y (within one year)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p1446431216522">Year</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p14464612155217">2001</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_01_0496__row57413164365"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__p774219165361">Y (across years)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__p137421316143611">Year</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__p1574214169369">2001</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row2464612195218"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p19464191218525">M</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p174641212135212">Month in a year</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p3464112115217">July or 07</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row1746451295210"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p6464612145212">d</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p44643125528">Day in a month</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p146415128523">10</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row44646120525"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p746451265215">h</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p114649122522">Hour in the 12-hour clock (1 to 12)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p4464181217521">12</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row2464191219529"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p1546451225218">H</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p18464121212522">Hour in the 24-hour clock (0 to 23)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p54645122525">22</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row2046421220524"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p8464161218523">m</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p1446461217523">Minute</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p174641912165211">30</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row246451235210"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p346431218524">s</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p1046415121524">Second</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p8464151215218">55</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row4464101210525"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p34642012175217">S</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p146415129527">Millisecond</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p4464121213525">234</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row046414122520"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p44641612185217">E</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p19464141214529">Day of a week</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__p135013613613">Mon, Tue, Wed, Thu, Fri, Sat, or Sun</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row34645127522"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p1846411225210">D</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p134641212155210">Date in the year</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p1746419127529">360</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row19464111285220"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p16464131215211">F</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p1046417124524">Day in a week of a month</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p546411218524">2(second Wed. in July)</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row8464161212524"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p7464812175213">w</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p169984311186">Week in a year</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p7464612105211">40</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row17464212125212"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p946401245212">W</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p935884014181">Week in a month</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p154646120527">1</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row246431210521"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p646491210521">a</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p10464412185213">A.M. /P.M.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p146491210527">PM</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row946471275212"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p846413126523">k</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p17464171255216">Hour in the 24-hour clock (1 to 24)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p94641812185220">24</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row1646417126521"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p184641812205215">K</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p2464141220522">Hour in the 12-hour clock (0 to 11)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p184647124525">10</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row17464612165210"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p4464161245215">z</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p8464112205217">Time zone</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p144641122523">Eastern Standard Time</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row4464111295218"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p346451235212">'</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p9464121295219">Text delimiter</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p2464712115218">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dataartsstudio_01_0496__en-us_topic_0132998733_row171953212228"><td class="cellrowborder" valign="top" width="27.272727272727277%" headers="mcps1.3.2.2.4.1.1 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p1119562152215">"</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.3939393939394%" headers="mcps1.3.2.2.4.1.2 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p219510210220">Single quotation mark</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.333333333333336%" headers="mcps1.3.2.2.4.1.3 "><p id="dataartsstudio_01_0496__en-us_topic_0132998733_p41954219220">No example</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="note" id="dataartsstudio_01_0496__note159925452916"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dataartsstudio_01_0496__p5993845295">The date and time mode is generally used in DateUtil embedded objects and Job embedded objects. For more examples of how the date and time mode is used, see <a href="dataartsstudio_01_0500.html">DateUtil Embedded Objects</a> and <a href="dataartsstudio_01_0498.html">Job Embedded Objects</a>.</p>
|
|
</div></div>
|
|
<div class="section" id="dataartsstudio_01_0496__section1336518910618"><h4 class="sectiontitle">Example</h4><p id="dataartsstudio_01_0496__en-us_topic_0132846500_p1726613116446">To obtain the date of the day before the planned scheduling time of a job, use the following EL expression:</p>
|
|
</div>
|
|
<pre class="screen" id="dataartsstudio_01_0496__screen1436516918618">#{DateUtil.format(DateUtil.addDays(Job.planTime,-1),"yyyy-MM-dd")}</pre>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dataartsstudio_01_0493.html">EL Expression Reference</a></div>
|
|
</div>
|
|
</div>
|
|
|