Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print ( {DATE} + 30 )

Status
Not open for further replies.

TheMitelGuy

IS-IT--Management
Mar 28, 2003
1,318
CA
We are using Crystal Reports to print out invoices from MS GreatPlanes.

I want to do a formula that will take the posting date from one of GP's databases and add 30 days.

In the end I want to be able to do something like this:
(syntex is completely wrong, but just for example)


Due_Date = GP.Invoice_Date + 30

Print = "Your invoice, in the amount " + GP.Invoice_Amount + " is due on " + Due_Date. + ".
 
You're looking for the DateAdd function. To add 30 days you could create a formula entitled Due Date and then put the following code:

DateAdd ("d",30,{GP.Invoice_Date})
 
You could also just have used:

{GP.Invoice_Date} + 30

...since the default value of an added integer is "days".

-LB
 
lbass, yeah your way is definitely simpler. Very new to CR myself and come from a programming side of things so DateAdd just popped into my head. Just started reviewing these forums - finding some gems of information.

If you're not an employee, Business Objects really ought to be compensating you in some way for how much you help their users!
 
I tried both of these and I get an error "A Boolean is required here"

DateAdd ("d",30,{mailings.date})
{mailings.date}) + 30

{mailings.date}is formatted as a date field and shows
5/24/2008

Using CR XI
 
Actually what I am trying to do is get ONLY those dates that are in the range of a ZERO to Month from {mailings.date})
so with a date of 5/24/2008
I want 5/24/2008 to 6/24/2008 in Select Expert
 
I did it

{sales.sold_date}> {mailings.date} and
{sales.sold_date} < {mailings.date} +31
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top