Timestamps and V5R1 RPG
August 28, 2002 Timothy Prickett Morgan
Hey, Ted:
I enjoy reading the tech tips in Midrange Guru, especially how to break up a string in Qshell . (You figured that out on a cocktail napkin at a bar, right?)
Craig Rutledge’s recent tip on comparing timestamps in RPG free is a bit too “robust.” To create a timestamp, just do this:
legacy_stamp = %date(legacy_date:*MDY) + %time(legacy_time:*hms); defined_stamp = defined_date + defined_time;
|
— Chris
I can’t take credit for the Qshell tip to split up a parameter. As with so many other RPG, CL, OCL, and VB tricks of the trade, I learned that tip from somebody else.
Thanks for the simplified code. Craig and I had tried your method, but for some reason, we couldn’t get it to work.
Several other readers sent in the same information. One of them, Carsten Flensburg, had the following comment to make:
“Having a brief look in the manual didn’t reveal any documentation for this behavior, but I guess that’s a documentation issue rather than a compiler issue.”
— Ted
Sponsored By ADVANCED SYSTEMS CONCEPTS |
SEQUEL meets all your iSeries and AS/400 data access needs in a single, integrated solution:
Take 6 minutes to view a SEQUEL ViewPoint ScreenCam movie to see how simple Windows-based AS/400 and iSeries data access can be! In just a few short minutes, you can find out ways to make your job easier and improve data access throughout your organization. Download the ViewPoint movie here . For more information or a FREE trial of SEQUEL, call 847/605-1311 or visit Advanced Systems Concepts. |