Jill, let me help you. of_lastdayofmonth() had a bad code there.
Remove all of statement below from your of_lastdayofmonth function.

If I can submit it to everyone then this will solve their problem too with
datetime service and increase performance, more batter than using loop.

integer li_year, li_month, li_day
li_year = Year(ad_source)
li_month = Month(ad_source)
li_day = 31

//Check for a valid day (i.e., February 30th is never a valid date)
Do While Not of_IsValid(Date(li_year, li_month, li_day)) &
  and li_day > 0
 li_day --
Loop

Return (Date(li_year, li_month, li_day))

then modified using below statement,

IF Month(ad_source) = 12 THEN
    Return RelativeDate(Date(String(Year(ad_source) + 1) + '/01/01'),-1)
ELSE
    Return RelativeDate(Date(String(Year(ad_source)) + '/' +
String(Month(ad_source) + 1) + '/01' ), -1)
END IF

Any of you know other PB newsgroup ??? I need more clue or trick with them
about getting more speed.
This is not solve since I was submit it before ( retrieve as needed won't do
any good for my app ).
But thanks anyway to everyone that comes with solution, I still need more
idea from you all.
Have a nice day.

AST
Senior programmer
PT. Koba Tin

----- Original Message -----
From: Jill M. Claus <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, February 07, 2000 11:22 PM
Subject: RE: PFCSIG 6.5.1 PFCs?


> The function always calculates an invalid date for 30 day months, and
therefore, returns January 1, 1900.  I have been told that this problem, and
many other problems, are fixed in the 6.5.1 PFC.  Hence, I am trying to
locate a copy of it.
>
> Jill
>
> >>> Rajendra Shetty <[EMAIL PROTECTED]> 02/03/00 11:26PM >>>
> What is the exact nature of the problem.
>
> Regards...
> Raj
>
> MASTEK LTD.
> IIS - ARTS Team
> Tel. : 829 0635 Ext. : 1050
>
>
> -----Original Message-----
> From: Jill M. Claus [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 03 February, 2000 12:18 PM
> To: [EMAIL PROTECTED]
> Subject: PFCSIG 6.5.1 PFCs?
>
>
> Hello Everyone,
>
> I am using PowerBuilder 6.5.1 on an NT4 PC and with Sybase 11.
>
> I ran into some problems today with the datetime service where the
function
> that calculates the last day of the month isn't working correctly.
>
> I have upgraded to the maintenance release 6.5.1, but I'm still using the
> 6.5 PFCs because I didn't see any new ones install with the maintenance
> release.
>
> Are there 6.5.1 PFCs?  And if so, where can I get them?
>
> Any help would be greatly appreciated.
>
> Thanks,
> Jill
>
>
> > [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS,
> ADDRESS
> > A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE:   help
pfcsig
> > SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]
>
> > [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS,
ADDRESS
> > A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE:   help
pfcsig
> > SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]
>


> [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS, ADDRESS
> A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE:   help pfcsig
> SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]

Reply via email to