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!

SQL command

Status
Not open for further replies.

makk07

Programmer
Aug 22, 2007
24
US
Hi Everyone,

How to write a SQL command for a crystal report for retrieving records only for last 7 days from a SQL Server database.
I am using crystal reports XI.Please help me out, I am new to reporting world also its urgent.

Thanks in advance for help
mak
 
You don't need SQL, Crystal selection will do it OK. Something like
Code:
DateDiff ("d", {your.date1},  currentdate) <= 6
This assumes you mean today and the last 6 days, and that no dates are in the future.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top