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


  • Subject: RE: Date format in V3R2?
  • From: "Stone, Brad V (TC)" <bvstone@xxxxxxxxxxxxxx>
  • Date: Wed, 16 May 2001 14:03:05 -0500

I chose to use the QWCCVTDT api.  Thanks to everyone for your suggstions.

Brad

> -----Original Message-----
> From: bmorris@ca.ibm.com [mailto:bmorris@ca.ibm.com]
> Sent: Wednesday, May 16, 2001 1:04 PM
> To: RPG400-L@midrange.com
> Subject: Re: Date format in V3R2?
> 
> 
> 
> >Date: Wed, 16 May 2001 09:37:39 -0500
> >From: "Stone, Brad V (TC)" <bvstone@taylorcorp.com>
> >
> >Is there any way to get the date format used in the job in 
> an RPG program?
> >
> >Heres my dilema.  I am logging data and always want to store 
> the date in
> >YYYYMMDD format in an 8,0 field.
> >
> >So, with I do a TIME operation I get the date and time.  
> Now, I want to do
> a
> >test(d) on the date to see if it's *USA, *ISO, or *EUR.  I'm 
> seeing bugs
> in
> >the way it works, though.
> >
> >Does anyone have any suggestions on a good way to do this?  
> It has to be
> >compliant with V3R2.  Here's what I have that doesn't work:
> > ...
> 
> Brad, do a *JOBRUN MOVEL from the 6-digit date part of TIME
> to a *ISO date field.  Then do a *ISO MOVE or MOVEL from the
> date field to your 8,0 field.  (You need to use the 12-digit
> form of TIME, because the job date formats are all 2-digit-year
> formats.)
> 
> I see that Anton Gombkötö already gave a similar answer,
> but he used MOVE in his example.  You have to use MOVEL in case
> the job format is *JUL.  (With *JUL, the date only has 5 digits,
> and MOVE uses the wrong 5 digits.)  The 6-digit date will work
> until the system date is 2039; hopefully by then the V3R2
> requirement will be gone.
> 
> (Or, you could use the CEE date routines, or QWCCVTDT etc as
> others have already suggested.)
> 
> Barbara Morris
> 
> +---
> | This is the RPG/400 Mailing List!
> | To submit a new message, send your mail to RPG400-L@midrange.com.
> | To subscribe to this list send email to RPG400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to 
> RPG400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: 
> david@midrange.com
> +---
> 
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.