× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks Scott.
I rarely work with Time values, so your information and the suggestions of others who responded has been of great help.

 
Jeff Young
Sr. Programmer Analyst
IBM -e(logo) server Certified Systems Exper - iSeries Technical Solutions V5R2 
IBM  Certified Specialist- e(logo) server i5Series Technical Solutions Designer V5R3
IBM  Certified Specialist- e(logo)server i5Series Technical Solutions Implementer V5R3
  
 






________________________________
From: Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>
To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
Sent: Thursday, November 20, 2008 6:22:19 PM
Subject: Re: Create TimeStamp from numeric fields

Hi Jeff,

I was attempting to use the %timestamp bif  to get my timestamp, but
after seeing your example, I realize that by creating Date and Time
fields concatenated into a TimeStamp data type field that it will do
exactly what I need.

You could use %timestamp() as well if you wanted to.  IMHO, it's a
little more cumbersome, but it'd work...

      D ts1            s              Z
      D ts2            s              Z
      D diff            s            10i 0

      /free

          ts1 = %timestamp( %editc(date1:'X')
                          + %editc(time1:'X')
                          + '000000'
                          : *ISO0 );

          ts2 = %timestamp( %editc(date2:'X')
                          + %editc(time2:'X')
                          + '000000'
                          : *ISO0 );

          diff = %diff(ts1: ts2: *seconds);


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.