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



Ricky,

The concept of "partial month" sounds a little strange but, what happens if
you convert your dates to *days and divide by 30.5? Would not that be enough
for your needs?

Regards,

Luis Rodriguez
IBM Certified Systems Expert — eServer i5 iSeries
--



On Thu, Jan 6, 2011 at 9:30 AM, Ricky Thompson <rthompson@xxxxxxxxxxxxxxx>wrote:

Is there a way to get the number of months in a numeric value with decimal
values? So if it 1.6 months between two dates. I'm trying to mimic
something someone is doing in Crystal Reports and it returns a partial
month. This is what I'm currently using.

DateDiff = %diff(Date1 : Date2 : *Months);
Ricky Thompson
AS/400 Programmer

Qualitest/Vintage Pharmaceuticals
120,130, 150 Vintage Drive
Huntsville, AL 35811 USA
Phone: +1 256-859-4011 x7191 Direct Line: +1 256-799-7191
rthompson@xxxxxxxxxxxxxxx
"This e-mail, and any attachments, may contain confidential, and/or legally
privileged information, and is intended solely for the use only of the named
addressee(s). If you have received this e-mail in error, please notify the
sender immediately, and permanently delete the original and any copies of
this e-mail, and any attachments, without printing, reading or copying them.
Any use, distribution, or copying of this e-mail other than by the intended
recipient is strictly prohibited. QUALITEST accepts no liability for the
content of this email, or for the consequences of any actions taken on the
basis of the information provided. The recipient should check this e-mail
and any attachments. QUALITEST accepts no liability for damage caused by any
malicious code potentially transmitted by this e-mail."

--
This is the RPG programming on the IBM i / System i (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.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.