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!

Want to subtract 13 weeks from Input parameter date? 2

Status
Not open for further replies.

ekimr

Technical User
Jun 28, 2002
124
GB
Hi,

At the moment I have managed to get the dates required by having a parameter date range on entry to the report thus forcing the user to put a start and end date in...

What I really want is to just have a start date (I assume a discrete value) then the end date is 13 weeks back (calculated not user input)...

Can anybody enlighten me...I am guessing I have to work in converting to numbers?

Thanks alot.
 
{DateField} in {?ParameterDate} to dateadd("ww",-13,{?ParameterDate})

Should do the trick
Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
Wow that was quick - did you reply before I typed the question !!!

off to try it..thanks..
 
Ok I am confused (I've never thought I was that technical after all!_

I am confused as to what should be in your datefield below?

I have substituted my correct parameter date field:

{DateField} in {?CollectionDate13Start} to dateadd("ww",-13,{??CollectionDate13Start})

The way I think it all hangs together is this:

I enter the report. My parameter field forces the USER prompt for a date. This becomes the CollectionDate13Start parameter.

from there I want the report header to say:

Report date: 1 september to 25 May (or whatever the 13 weeks back is).....

So at this early stage I am not working with a date field?

Thanks for any help.
 
ToText({?CollectionDate13Start},"d MMMM") + " To " + ToText(DateAdd ("ww",-13 , {?CollectionDate13Start}),"d MMMM")
 
My formula was the record selection formula, so your report only reflects records for that date range.

Joe's formula is the one that you need to display the date range in your report or page header. Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
Yes - thanks to both of you...

Both answers were equally important, although I clearly described only half the problem , i got both answers. ta
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top