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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date formula needed

Status
Not open for further replies.

mazmouzi

Technical User
Nov 28, 2002
4
AU
Hi there.I have an crystal report.i would like to create a formula date for it, which gives the date 30 days before the current date(it is like start date) also i have to put end date (it is like between ).Please can u confirm how i can create it as soon as possible.
 
{YourDateField} in CurrentDate to Dateadd("m",-1,CurrentDate)

Or something similar should give yuou what you want. Have a look at the dateadd() help files, there are several arguments you can use here. Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
hi there,
i used the date add() function but i still facing the same problem can u make sure how i can write the code for it and what i have to do to fix it?
 
Please post your current formula, and tell me where it is located on your report. Is this a record selection formula? Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
select recordid,lname ,fname, abbreviated_title, courses.start_date,courses.institution_id, courses.course_id,selected_courses.course_id, selected_courses.recordid

from person, courses, selected_courses

where selected_courses.recordid=person.recordid and courses.course_id=selected_courses.course_id and courses.institution_id='<$USER>'and
courses.start_date=dateadd(&quot;m&quot;,-1,&quot;31-jan-95&quot;)
order by lname, start_date
that what i've done
actually i need the start date before 30 days than this date (31-jan-95)and less than any date in 2010.
 
This is a SQL select statement, not a crystal record selection formula.

Try using the dateadd() in the crystal record selection formula and see if you yield any results. Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top