Solved

LastFullWeek from Last year

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

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…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

809 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