TODAY = ICONV("31 JAN 2011", "D") ;* 15737
EOM = TODAY - TODAY"DD" + 32 ;* 15737 - 31 + 32 = 15738
EOM = EOM - EOM"DD" ;* 15738 - 15738"DD"
PRINT EOM ;* 15738 - 1 = 15737
* OCONV(15737, "D") = "31 JAN 2011"
* WORKS FINE - UDT 7.1.7 (AIX)
> Date: Mon, 5 Dec 2011 15:52:40 -0500
> From: [email protected]
> To: [email protected]
> Subject: Re: [U2] End of Month date routine
>
> No, this will fail on January 31st, every year.
>
> Sincerely,
> David Laansma
> IT Manager
> Hubbard Supply Co.
> Direct: 810-342-7143
> Office: 810-234-8681
> Fax: 810-234-6142
> www.hubbardsupply.com
> "Delivering Products, Services and Innovative Solutions"
>
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Marco Antonio
> Rojas Castro
> Sent: Monday, December 05, 2011 3:49 PM
> To: [email protected]
> Subject: Re: [U2] End of Month date routine
>
>
> TODAY = DATE()
> EOM = TODAY - TODAY"DD" + 32
> EOM = EOM - EOM"DD"
>
>
>
> > To: [email protected]
> > From: [email protected]
> > Date: Mon, 5 Dec 2011 15:16:02 -0500
> > Subject: Re: [U2] End of Month date routine
> >
> >
> > Doesn't work on my system Anthony.
> > The This month o gives the month and year ok but the attempt to iconv
> > that sets it to zero, it doesn't pad the "01" into it or something so
> > i just get 31 at that point.
> >
> > I think you were expecting that it would take "12 2011" and make it
> > into "12 01 2011" or whatever but it's not working
> >
> >
> >
> >
> > -----Original Message-----
> > From: George Gallen <[email protected]>
> > To: U2 Users List <[email protected]>
> > Sent: Mon, Dec 5, 2011 12:10 pm
> > Subject: Re: [U2] End of Month date routine
> >
> >
> > Haven't checked it, but what happens on 01/31 by adding 31, it should
> > take you arch, backing up Will give you 02/xx (28 or 29)?
> > George
> > -----Original Message-----
> > rom: [email protected]
> > [mailto:[email protected]]
> > n Behalf Of Wols Lists
> > ent: Monday, December 05, 2011 3:05 PM
> > o: [email protected]
> > ubject: Re: [U2] End of Month date routine On 05/12/11 19:03, Wjhonson
>
> > wrote:
> >
> > Does someone have a routine that, no matter what day you run it,
> > returns the nd of Month Date ?
> > (Assume the end of month date, is the calendar end of month date not
> > some crewy business date) Hmmm... no-one seems to have done my
> > approach ...
> > TODAY = @DATE
> > HIS.MONTH.O = OCONV (TODAY, "DMY") ;* strip day off EXT.MONTH.I =
> > ICONV( THIS.MONTH.O, "D") + 31 ;* random day next month EXT.MONTH.O =
> > OCONV( NEXT.MONTH.I, "DMY") ;* strip day off AST.DAY.I = ICONV(
> > NEXT.MONTH.O, "D") - 1 ;* subract one day If you don't have a day in
> > your i/oconv it defaults to 1, so the logic orks. Unfortunately you
> > can't combine the first three lines because here's no number you can
> > pick that will guarantee to land you in next onth whatever today's
> > date :-( Cheers, ol ______________________________________________
> > 2-Users mailing list
> > [email protected]
> > ttp://listserver.u2ug.org/mailman/listinfo/u2-users
> > ______________________________________________
> > 2-Users mailing list
> > [email protected]
> > ttp://listserver.u2ug.org/mailman/listinfo/u2-users
> >
> > _______________________________________________
> > U2-Users mailing list
> > [email protected]
> > http://listserver.u2ug.org/mailman/listinfo/u2-users
>
> _______________________________________________
> U2-Users mailing list
> [email protected]
> http://listserver.u2ug.org/mailman/listinfo/u2-users
> _______________________________________________
> U2-Users mailing list
> [email protected]
> http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users