Solved

LastFullWeek from Last year

Posted on 2002-07-25
5
255 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 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

23 Experts available now in Live!

Get 1:1 Help Now