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

Date Formula Question 2

Status
Not open for further replies.
Jul 23, 2002
26
We are a training provider and we need to be able to generate a list of students that are six weeks out from completing their class. Our database has a field that is called "class end date", how can that be used to pull a list of those students who are six weeks away from completing? is that even possible in crystal?
Of course this list would change from week to week.

Thanks for all your help!
Joe
 
This formula will give a datetime value that is 42 days forward. You can select based on the table's class end date being equal or make a range using the same process.

CDateTime(cdate(DateAdd ("d",42 , currentdate )), CTime(00,00,00))

If you need date rather than datetime, leave the outside formula off.

 
Or you could simplify this to:

{table.classenddate} < currentdate + 42

...for within the next six weeks. Or if you want dates in a range, try something like:

{table.classenddate} in currentdate + 42 to currentdate + 48

-LB
 
I'm sorry I'm still a little unclear with how to use the above formulas.

An example of our data is this:
studentname classenddate
John 3/22/06
Tom 3/29/06
Joan 4/22/06
Nancy 4/05/06

Todays date is 2/22/06 and the report I'm trying to write needs to show a list that looks like this:
studentname classenddate
John 3/22/06
Tom 3/29/06
Nancy 4/05/06

The three students above have a classendate that falls within the next 6 weeks.

Hope this makes sense and is possible to do in Crystal.

Thanks again for all your ideas!
Joe
 
Go to report->selection formula->record and enter:

{table.classenddate} in currentdate to currentdate + 42

-LB
 
raghu55(developer)

Actually, I am working in visual studio.net crystal reports,
I have a problem with formatting the report and exporting in excel spreadsheet.
Could you tell, Any possibility how to format and export the report in excel spreadsheet.


Thank you.

 
raghu55--

Please start a new thread, as your question does not relate to this thread topic. There are also a lot of threads related to exporting to Excel. You might try doing a search first.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top