<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://try-as400.pocnet.net/index.php?action=history&amp;feed=atom&amp;title=Using_timestamps_in_RPG</id>
	<title>Using timestamps in RPG - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://try-as400.pocnet.net/index.php?action=history&amp;feed=atom&amp;title=Using_timestamps_in_RPG"/>
	<link rel="alternate" type="text/html" href="http://try-as400.pocnet.net/index.php?title=Using_timestamps_in_RPG&amp;action=history"/>
	<updated>2026-05-05T21:00:11Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>http://try-as400.pocnet.net/index.php?title=Using_timestamps_in_RPG&amp;diff=1334&amp;oldid=prev</id>
		<title>PoC: /* Weblinks */ Linkfix</title>
		<link rel="alternate" type="text/html" href="http://try-as400.pocnet.net/index.php?title=Using_timestamps_in_RPG&amp;diff=1334&amp;oldid=prev"/>
		<updated>2023-05-21T12:18:32Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Weblinks: &lt;/span&gt; Linkfix&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:18, 21 May 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l39&quot;&gt;Line 39:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 39:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Weblinks ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Weblinks ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ibmdocs&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pocnet&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;net&lt;/del&gt;/SC41-5712-01&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.pdf SC41-5712-01], AS/400e DDS Reference&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;www&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ibm&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;com&lt;/ins&gt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;resources/publications/OutputPubsDetails?PubID=SC41571201 AS/400e DDS Reference], &lt;/ins&gt;SC41-5712-01&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ibmdocs&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pocnet&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;net&lt;/del&gt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SC09-2508-02.pdf SC09-2508-02], &lt;/del&gt;AS/400e ILE RPG for AS/400 Reference&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;www&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ibm&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;com/resources&lt;/ins&gt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;publications/OutputPubsDetails?PubID=SC09250802 &lt;/ins&gt;AS/400e ILE RPG for AS/400 Reference&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;], SC09-2508-02&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Footnotes ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Footnotes ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key tryas400:diff:1.41:old-1295:rev-1334:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>PoC</name></author>
	</entry>
	<entry>
		<id>http://try-as400.pocnet.net/index.php?title=Using_timestamps_in_RPG&amp;diff=1295&amp;oldid=prev</id>
		<title>PoC: New</title>
		<link rel="alternate" type="text/html" href="http://try-as400.pocnet.net/index.php?title=Using_timestamps_in_RPG&amp;diff=1295&amp;oldid=prev"/>
		<updated>2023-02-23T21:27:10Z</updated>

		<summary type="html">&lt;p&gt;New&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Using &amp;#039;&amp;#039;&amp;#039;timestamps in RPG&amp;#039;&amp;#039;&amp;#039; is not as straightforward as using character, or decimal fields.&lt;br /&gt;
&lt;br /&gt;
RPG has an &amp;#039;&amp;#039;internal&amp;#039;&amp;#039; way to handle timestamps, which is incompatible with the &amp;#039;&amp;#039;external&amp;#039;&amp;#039; representation in externally described fields, such as database- and display files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; Adding the internal date/time handling routines is a compile time option. Use &amp;lt;code&amp;gt;CVTOPT(*DATETIME)&amp;lt;/code&amp;gt; in a &amp;lt;code&amp;gt;H&amp;lt;/code&amp;gt; line.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
;CHANGED&lt;br /&gt;
:is a timestamp field in the database (physical file).&amp;lt;ref&amp;gt;RPG imports that as anything but a timestamp declared in the &amp;lt;code&amp;gt;D&amp;lt;/code&amp;gt; statements.&amp;lt;/ref&amp;gt;&lt;br /&gt;
;STAMP$&lt;br /&gt;
:is a 19 character field in the DSPF, for containing the pretty printed timestamp.&lt;br /&gt;
;STAMP&lt;br /&gt;
:is the RPGLE defined timestamp (&amp;lt;code&amp;gt;Z&amp;lt;/code&amp;gt;) field. The &amp;lt;code&amp;gt;TIME&amp;lt;/code&amp;gt; operator writes to this variable.&lt;br /&gt;
&lt;br /&gt;
* PF:&lt;br /&gt;
 A            CHANGED         Z&lt;br /&gt;
&lt;br /&gt;
* DSPF:&lt;br /&gt;
 A            STAMP$        19A  O ...&lt;br /&gt;
&lt;br /&gt;
* RPGLE:&lt;br /&gt;
 D* For saving/handling timetamp data.&lt;br /&gt;
 DSTAMP            S               Z&lt;br /&gt;
 D*&lt;br /&gt;
&lt;br /&gt;
For every time we write, or update a record:&lt;br /&gt;
 C* Current time → Database&lt;br /&gt;
 C                   TIME                    STAMP&lt;br /&gt;
 C                   MOVEL     STAMP         CHANGED&lt;br /&gt;
&lt;br /&gt;
Database → Pretty print DSPF field&lt;br /&gt;
 C* Get timestamp, and produce nice version thereof.&lt;br /&gt;
 C                   MOVEL     CHANGED       STAMP$&lt;br /&gt;
 C     &amp;#039;.&amp;#039;:&amp;#039;:&amp;#039;       XLATE     STAMP$        STAMP$&lt;br /&gt;
 C     &amp;#039;-&amp;#039;:&amp;#039; &amp;#039;       XLATE     STAMP$:11     STAMP$&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Using floating point numbers in RPG]]&lt;br /&gt;
&lt;br /&gt;
== Weblinks ==&lt;br /&gt;
* [https://ibmdocs.pocnet.net/SC41-5712-01.pdf SC41-5712-01], AS/400e DDS Reference&lt;br /&gt;
* [https://ibmdocs.pocnet.net/SC09-2508-02.pdf SC09-2508-02], AS/400e ILE RPG for AS/400 Reference&lt;br /&gt;
&lt;br /&gt;
== Footnotes ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Programming]]&lt;/div&gt;</summary>
		<author><name>PoC</name></author>
	</entry>
</feed>