Results 1 to 4 of 4

Thread: Date Counting

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Posts
    133

    Date Counting

    I have a report that is grouped by week. Under each week there are details. I want to sort it by oldest date to newest..... but here's the kicker... I want, in each group, to not only give me the week beginning date, but to also say "N Weeks Old" What's the best possible method of doing this?

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Date Counting

    If you are using Crystal Reports a formula with something like the following might work for you

    ToText(DateDiff ("ww",{Orders.OrderDate} ,CurrentDate), 0) + " Weeks Old"

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Posts
    133

    Re: Date Counting

    Quote Originally Posted by brucevde
    If you are using Crystal Reports a formula with something like the following might work for you

    ToText(DateDiff ("ww",{Orders.OrderDate} ,CurrentDate), 0) + " Weeks Old"
    Since it is grouped weekly, I want to do it based off of the group name. I tried this but getting errors..

    ToText(DateDiff ("ww", GroupName ({ORDERS.EDATE}, "weekly"),CurrentDate), 0) + " Weeks Old"

  4. #4
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Date Counting

    Since it is grouped weekly, I want to do it based off of the group name.
    Sorry, I am not following your logic.
    What is displayed and/or incorrect if you use

    ToText(DateDiff ("ww", {ORDERS.EDATE},CurrentDate), 0) + " Weeks Old"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width