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



When I tried the following:

0038.22 C                   EVAL      DTMPDT = %INT(%CHAR(%DATE(): *MDY0))

I get a compile error that says the parameter for %int is not valid, I 
suppose I could break it down by converting the date into a character type 
and then add an additional line to convert it to an integer


On Fri, 14 Apr 2006 15:50:04 +0200, HauserSSS wrote
> Hi,
> 
> did you try the following:
> 
> Release V5R3M0 and higher:
> DateMDY = %Dec(%Date(): *MDY);
> 
> Release V5R2M0
> DateMDY = %Int(%Char(%Date(): *MDY0));
> 
> Mit freundlichen Gruessen / Best regards
> 
> Birgitta
> 
> "Shoot for the moon, even if you miss, you'll land among the stars."
> (Les Brown)
> 
> -----Ursprungliche Nachricht-----
> Von: rpg400-l-bounces@xxxxxxxxxxxx
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx]Im Auftrag von Douglas W. Palme
> Gesendet: Freitag, 14. April 2006 15:10
> An: RPG Group
> Betreff: converting system date to integer
> 
> I am in need of converting a system date to a six digit numeric....
> 
> So if the system date is say 04/14/06 I need to convert it to a 
> 041406 numeric type...
> 
> I thought about doing it by using a move statement with *MDY in 
> factor one but I don't believe that will work as I would have to use 
> 10 digits for the date.
> 
> the problem is we have some display files that there is not enough 
> room to allow for a four digit year and I am not prepared at this 
> time to re-write the entire file.
> 
> Suggestions or hints?
> 
> If you bought it, it was hauled by a truck - somewhere, sometime.
> 
> --
> This is the RPG programming on the AS400 / iSeries (RPG400-L)
>  mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To 
> subscribe, unsubscribe, or change list options, visit: 
> http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-
> L-request@xxxxxxxxxxxx Before posting, please take a moment to 
> review the archives at http://archive.midrange.com/rpg400-l.
> 
> -- 
> This is the RPG programming on the AS400 / iSeries (RPG400-L)
>  mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To 
> subscribe, unsubscribe, or change list options, visit: 
> http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-
> L-request@xxxxxxxxxxxx Before posting, please take a moment to 
> review the archives at http://archive.midrange.com/rpg400-l.


If you bought it, it was hauled by a truck - somewhere, sometime.


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.