Solved

LastFullWeek from Last year

Posted on 2002-07-25
5
259 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 101

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 101

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

707 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