Date Format

SUGGESTED

I am building a custom crystal report off the AP Invoice Table. When I grab the APIBH.DATEINVC file, it shows 20,110,101.00. I want to convert it to 1/1/2011. I tried using the following formula:

date({APIBH.DATEINVC}) but it does not work. Any suggestions or help would be appreciated.

Parents
  • 0
    SUGGESTED

    I have found this formula to be pretty useful and not too taxing in terms of affecting the speed of the report.

    cdate( tonumber(         left({ANY_DATE_FIELD},4)),
                tonumber(right(left({ANY_DATE_FIELD},7),2)),
                tonumber(right(left({ANY_DATE_FIELD},10),2)))

  • 0 in reply to Bill Thoms

    The #1 speed problem with Sage dates and Crystal is when people create Date parameters, and have selection formula s like:

    pwFormatdate({sagedatefield}) between {?FromDate} and {?ToDate}

    When you do this, Crystal has to retrieve ALL the records to calculate the values.  The much better way is like this:

    {SageDateField} between Tonumber(ToText({?FromDate},"yyyyMMdd")) and Tonumber(ToText({?ToDate},"yyyyMMdd"))

Reply
  • 0 in reply to Bill Thoms

    The #1 speed problem with Sage dates and Crystal is when people create Date parameters, and have selection formula s like:

    pwFormatdate({sagedatefield}) between {?FromDate} and {?ToDate}

    When you do this, Crystal has to retrieve ALL the records to calculate the values.  The much better way is like this:

    {SageDateField} between Tonumber(ToText({?FromDate},"yyyyMMdd")) and Tonumber(ToText({?ToDate},"yyyyMMdd"))

Children