Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2002
    Posts
    30

    Red face Unanswered: filter for date (>6 months)

    hi all,

    I'm using crystal report v 7.0. This version does not has the VB script integrated.

    I want to filter all records by user_dt field that are more than 6 months old from the today/current date. eg: if today date is 11/03/04 then i will only select record that is 11/09/03 or before.

    How can i do this in report-record selection formula?

    Please assist. Thanks.


    John sek

  2. #2
    Join Date
    Mar 2004
    Location
    Calgary, AB Canada
    Posts
    7
    Do you have the DateAdd function available to you in your version?

    Djangman

  3. #3
    Join Date
    Jul 2002
    Posts
    30
    No. Dateadd is only available for CR version 8 and above.

    Thanks.

  4. #4
    Join Date
    Mar 2004
    Location
    Calgary, AB Canada
    Posts
    7

  5. #5
    Join Date
    Mar 2004
    Location
    Asia Pacific
    Posts
    14
    im quite new to crystal report but you can try the datediff function
    then create a routine that would identify those who are greater than
    60 days based on the result of the datediff funtion. I've done the same with my aging bracket report

  6. #6
    Join Date
    Mar 2004
    Location
    Asia Pacific
    Posts
    14
    sorry make that 6 months. anyway after determining their date differences it would be easy for you to filter fields that satisfies your statement.

  7. #7
    Join Date
    Mar 2004
    Location
    Pakistan
    Posts
    31
    if you are using vb in front end you can send recod selection formula
    by using crystal report control is placed in visual basic 5 or later version
    you can use dateadd
    visual basic sentence
    DateAdd("m", -6, date)
    current date system in vb6
    passing
    selection formula from vb
    using crystal report control
    It may help u
    Regards
    wasim

  8. #8
    Join Date
    Mar 2007
    Posts
    1
    {xxx.Date} > (DateTime (CurrentDate)-182) and {xxx.Date} < (CurrentDate)

    maybe as a record selection formula...? dunno if thats helpful - i'm using XI

Posting Permissions

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