× 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.



Very nice, Rob - thanks for the examples..

On 4/17/2015 9:09 AM, rob@xxxxxxxxx wrote:
Updated for more SQL...
DCL-S ts1 TIMESTAMP(12);
ts1 = %timestamp(*sys : 12); // ignores precision, documented
dsply ts1; // 2015-04-17-10.04.22.888000000000
ts1 = %timestamp('2015-04-17-08.56.13.123456789012' : *iso : 12);
dsply ts1; // 2015-04-17-08.56.13.123456789012
exec sql values current_timestamp into :ts1;
dsply ts1; // 2015-04-17-10.04.22.913524000000
exec sql values current_timestamp(12) into :ts1;
dsply ts1; // 2015-04-17-10.04.22.932533985351
*inlr=*on;
return;


Rob Berendt
-- IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail to: 2505 Dekko Drive Garrett, IN 46738 Ship to: Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com From: rob@xxxxxxxxx To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> Date: 04/17/2015 09:14 AM Subject: Re: TimeStamp Problem Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx> Vern, Is that for both RPG and SQL? Well, kinda sorta. I'm at 7.2 DCL-S ts1 TIMESTAMP(12); ts1 = %timestamp(*sys : 12); dsply ts1; ts1 = %timestamp('2015-04-17-08.56.13.123456789012' : *iso : 12); dsply ts1; *inlr=*on; return;
>call rob/timestamp
DSPLY 2015-04-17-09.12.19.392000000000
DSPLY 2015-04-17-08.56.13.123456789012


Rob Berendt
-- IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail to: 2505 Dekko Drive Garrett, IN 46738 Ship to: Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com From: Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx> To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> Date: 04/16/2015 05:43 PM Subject: Re: TimeStamp Problem Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx> At 7.2 the timestamp precision has been increased - you can now go up to 12 digits in the fraction of seconds. We're not yet on 7.2, so it'd interesting to hear the experience of others in this. Vern


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.