Solved

LastFullWeek from Last year

Posted on 2002-07-25
5
254 Views
Last Modified: 2012-08-14
I'm running a report which compares results from last week using the LastFullWeek function. However, i would like to compare the same week in last year. I have tried LastFullWeek-52 but without any luck.

***CURRENTLY***
If {SaleDate} = LastFullWeek
THEN {Transactions}

***I WOULD LIKE***
If {SaleDate} = LastFullWeek (IN THIS TIME LAST YEAR)
THEN {Transactions}


Any help is appreciated :)
0
Comment
Question by:m0ley
  • 3
  • 2
5 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 7177359
You can find the same week by

Dateadd ("W",-52,{SaleDate})

You can then use that in your if statement.

good luck
mlmcc
0
 

Author Comment

by:m0ley
ID: 7177422
hi mimcc,

thx for the quick response but,

Dateadd does'nt seem to function in formula editor
0
 

Author Comment

by:m0ley
ID: 7177618
i have managed to install the DateAdd function as i am using version 7. Only to find another error shows up. This time is states 'A date-time is required here'
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 164 total points
ID: 7178049
What does {SaleDate} look like.  It needs to be a DateTime.  If it is a string you can use CDate(SaleDate) to convert to a date.

Other options are
DateTime (YYYY,MMM,DD)
Date (YYYY,MMM,DD)

Look through the Date and Type Conversion functions in the formula editor.  Use the HELP to determine what each requires and expects.  You should be able to find a way to convert  to a datetime.

mlmcc
0
 

Author Comment

by:m0ley
ID: 7179672
mimcc,

CDate did not work, however DateTime works, and after a couple more hours trying to grab the whole week of last year, i have managed to get it working.... thx a lot for help!

much appreciated :)

m0le2000
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now