Advertisement

07.03.2008 at 02:18AM PDT, ID: 23536198
[x]
Attachment Details

To Find Last date of the same month.

Asked by Mehram in PowerBuilder Programming Language

PB Version 7

date ld_date,ld_date2
this.accepttext()
choose case dwo.name
case "d_column_1"
            ld_date = this.getitemdate(1,"d_column_1")
            ld_date2 = relativedate(ld_date, 32)
            ld_date2 = relativedate(ld_date2,day(ld_date2)*-1)
            this.setitem(1,"d_column_2",ld_date2)
end choose


The above script find last date of the same month for any given date. This works fine for all dates except when the starting date is already last of the month. For example, When start_date is June 30, 2008 the end_date calculated by the above script is July 31 2008 instead of June 30 2008.

What is the Problem?Start Free Trial
[+][-]07.03.2008 at 03:59PM PDT, ID: 21930012

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: PowerBuilder Programming Language
Sign Up Now!
Solution Provided By: sandeep_patel
Participating Experts: 2
Solution Grade: A
 
 
[+][-]07.03.2008 at 10:21PM PDT, ID: 21931126

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 10:42PM PDT, ID: 21936003

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 10:43PM PDT, ID: 21936006

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 11:43PM PDT, ID: 21936118

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 - Hierarchy / EE_QW_2_20070628