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!

last7days 1

Status
Not open for further replies.

cm1234

Technical User
Oct 18, 2002
41
DK
Hello out there

Im running CR 9,0 and the data in this question comes from oracle 9,0
Here comes my question:
How can i show last3days in CR 9,0
Date comes from an odinary datetime field and looks like this >> 12-09-2004 12:22:45 << and so on
There is a function called last7days this would just do the job if possible to put 3 instead off 7 !!!!!!!!
Hope this makes some sence
and somebody can help here???
best regards
cm1234


 
Doing date math is actually fairly easy - you compare your datetime field to "CurrentDate - 3".

-Dell
 
Hi Hilfy

Normaly i would give you absolute right but
this does not work for me, when i put
my >>{table.date} = currentdate-3<<
i get only the date three daysago
and not what is inbetween???????
Is there another way to do this date thing?

best regards
cm1234




 
Try this:

{table.datefield} in currentdate - 3 to currentdate

~Brian
 
Thank you both

But the hint from Breed35 just did the job

best regards
cm1234
 
I need to do something similar (I think). From a single date from a parameter (which runs daily stats) I need to calculate the beginning of the week (a Monday), the beginning of the month, the beginning of the fiscal quarter (July through Sept., Oct. through Dec., etc) and the beginning of the year so that I can report cummulative stats for those time periods (beginnings to my entered date). Can someone point me in the right direction (with a few basic examples) please??
 
You need DateAdd functions, as well as DatePart. If it's not immediately obvious what these do, then write a couple of experimental reports using known data, till it is clear. Failing this post again, but it would be better to start a new thread, since it is a distinct topic.

It helps to give your Crystal version, since newer versions have extra options, and some extra problems. I use Crystal 8.5

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top