Welcome, Guest. Please Login.
05/17/24 at 01:15:22
News:
Home Help Search Login


Pages: 1
Send Topic Print
Formula Needed (Read 1067 times)
Tim Keating
Senior Member
****


DBA CLASSIC WIN 2000
C/S

Posts: 298
Formula Needed
02/13/07 at 11:22:21
 
I'm writing an aging report that will accomodate PROX terms and wonder if anyone could help with a formula.
 
For a given invoice date, I'd like a formula to return the date for, say, the 25th of the next month.
Back to top
 
 

Tim Keating
Motor Guard Corporation
Email WWW   IP Logged
kevind
Active Member
*****


I was more than
willing to
"pony up",
how b'out U?

Posts: 639
Gender: male
Re: Formula Needed
Reply #1 - 02/13/07 at 12:11:16
 
Would this work for you?


date( year(dateadd("m", 1, {BKARINV.BKAR_INV_INVDTE})),
     month(dateadd("m", 1, {BKARINV.BKAR_INV_INVDTE})),
     25);

Back to top
 
 

Kevin Damke
Spectronics Corporation
ISTECH 2004.1 7/26/13 SP1 - 20 user
Evo-ERP Build 7/25/13 T7 -7i R6 - 3 user
(Prev version was 2004.1 10/24/12)
(All Patches Installed as of 7/26/13)
Pervasive 2000i SP4 - Crystal Reports V10
Email WWW   IP Logged
Tim Keating
Senior Member
****


DBA CLASSIC WIN 2000
C/S

Posts: 298
Re: Formula Needed
Reply #2 - 02/13/07 at 12:34:07
 
Looks good, except it won't wrap to the next year properly.
 
I think I can work with it though.
 
Thank you.
Back to top
 
 

Tim Keating
Motor Guard Corporation
Email WWW   IP Logged
kevind
Active Member
*****


I was more than
willing to
"pony up",
how b'out U?

Posts: 639
Gender: male
Re: Formula Needed
Reply #3 - 02/13/07 at 12:37:10
 
I saw that after I posted  Shocked
 
I corrected it above.  Sorry   embarrassed
 
Back to top
 
 

Kevin Damke
Spectronics Corporation
ISTECH 2004.1 7/26/13 SP1 - 20 user
Evo-ERP Build 7/25/13 T7 -7i R6 - 3 user
(Prev version was 2004.1 10/24/12)
(All Patches Installed as of 7/26/13)
Pervasive 2000i SP4 - Crystal Reports V10
Email WWW   IP Logged
Tim Keating
Senior Member
****


DBA CLASSIC WIN 2000
C/S

Posts: 298
Re: Formula Needed
Reply #4 - 02/13/07 at 12:37:58
 
I've been kicking this little gem around:
 
date(Year(dateadd('m',{@ProxMo},datetime({BKARINVT.BKAR_INVT_DATE}))),month(date
add('m',{@ProxMo},datetime({BKARINVT.BKAR_INVT_DATE}))),25)
 
The @ProxMo formula determines whether to advance one month or two, depending on the invoice date:
 
if day({BKARINVT.BKAR_INVT_DATE}) < 25 then 1 else 2
 
I've got to learn how to use declared variables.
Back to top
 
 

Tim Keating
Motor Guard Corporation
Email WWW   IP Logged
Tim Keating
Senior Member
****


DBA CLASSIC WIN 2000
C/S

Posts: 298
Re: Formula Needed
Reply #5 - 02/13/07 at 12:39:21
 
Thanks, Kevin.
 
Your edited formula will work for me.
Back to top
 
 

Tim Keating
Motor Guard Corporation
Email WWW   IP Logged
Pages: 1
Send Topic Print