Skip to Content
author's profile photo
Former Member

Subtract today's date from MonthtoDate

Post Author: LarryA

CA Forum: Formula

Is it possible to remove today's date from date formula like Monthtodate, WeektodayfromSunday, Yeartodate. On Currentdate I was able to do (CurrentDate - 1) but that does not work with the multidate formulas.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • author's profile photo
    Former Member
    Posted on Aug 23, 2007 at 09:35 PM

    Post Author: GraemeG

    CA Forum: Formula

    What's the scenario Larry? It might make it easier to help.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Aug 24, 2007 at 03:39 PM

    Post Author: LarryA

    CA Forum: Formula

    I have four columns Yesterday Sales, WTD Sales, MTD Sales, YTD Sales they are grouped by salesrep, when I run my reports each day I don't want to factor in the sales that are taking place today as I mentioned before I handled yesterday sales by using "currentdate -1" but when I try to use crystal's built in functions for "Weektodatefromsunday", "MonthToDate", & "YeatToDate" and place "-1" I get the following error "A number, currency amount, date, time, or date-time is required here."

    My fomula looks like this:

    if {CONTHIST.ONDATE}= (MonthToDate) then{@Duration}

    @duration is my sales amount.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Aug 24, 2007 at 03:48 PM

    Post Author: pvierheilig

    CA Forum: Formula

    Hi - this might be what you need:

    "If you would like to base the date range on a date other than today's date, you must either change the date via the Date/Time option in the Windows Control Panel, or change the report print date via the Set Print Date and Time command in the Report Menu."

    Got this from the Help docs.

    Add comment
    10|10000 characters needed characters exceeded