Won't this method choke if ORIG.MM is 12?

===========================================================
Norman Morgan <> [EMAIL PROTECTED] <> http://www.brake.com
===========================================================
Unscrewing an Oreo lets all the calories out.
===========================================================



> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Allen Egerton
> Sent: Thursday, June 02, 2005 12:57 PM
> To: u2-users@listserver.u2ug.org
> Subject: Re: [U2] Finding last day of month
>
>
> From: "Marco Manyevere" <[EMAIL PROTECTED]>
>
>
> > Hi,
> >
> > Given a date like 20040203, I want to return the last valid
> date for that
> month and year (20040229 in this case). What is the shortest code fragment
> to achieve this?
>
> Find the internal date of the first day of the next month, subtract 1, and
> convert it back to external format.
>
> ORIG.YYYY = YYYYMMDD[1,4]
> ORIG.MM = YYYYMMDD[5,2]
> ORIG.DD = YYYYMMDD[7,2]
>
> I.LAST.DAY = (ICONV(ORIG.YYYY:(ORIG.MM + 1): "01"), "D4/") - 1
> O.LAST.DAY = OCONV(I.LAST.DAY, "D4/"
> -------
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.322 / Virus Database: 267.4.1 - Release Date: 6/2/2005
>
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 267.4.1 - Release Date: 6/2/2005
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to