Applying a SETRANGE/SETFILTER to Posting Date

iqbalmadiqbalmad Member Posts: 179
Hi,

When you run the "Close Income Statement", entries are generated on table 17 where the "Posting Date" has a C in front e.g "C31/12/08"

How do i do, if i want to have a report taking only these type of entries only

i must do a SETFILTER("Posting Date",?????????);

thanks

Comments

  • AlbertvhAlbertvh Member Posts: 516
    Hi

    From Help
    CLOSINGDATE (Date)
    Use this function to return the closing date for a Date.

    ClosingDate := CLOSINGDATE(Date)
    ClosingDate

    Data type: date

    The system returns the corresponding closing date for Date.

    Date

    Date type: date

    The input date.

    Comments
    All dates have a corresponding closing date. To the system, a closing date is a period following the given date, but before the next normal date. Closing dates are sorted immediately after the corresponding normal date, but before the next normal date.

    August 1996






    Monday
    Tuesday
    Wednesday




    1

    2

    3


    (080196D)
    (080196C)
    (080296D)
    (080296C)
    (080396D)
    (080396C)


    xxxxxxD: Normal date

    xxxxxxC: Closing date

    Example
    These examples show how to use the CLOSINGDATE function. In the first example a normal date is given as input. In the second example a closing date is given as input.

    With a normal date as input:

    Date1 := 040496D;
    CloDate := CLOSINGDATE(Date1);
    MESSAGE(Text000, Date1, CloDate);

    Create the following text constant in the C/AL Globals window:

    Text Constant
    ENU Value

    Text000
    'The closing date for %1 is %2.'


    This message appears:

    The closing date for 04/04/96 is C04/04/96.

    With a closing date as input:

    Date1 := CLOSINGDATE(040496C);
    CloDate := CLOSINGDATE(Date1);
    MESSAGE(Text001, Date1, CloDate);

    Create the following text constant in the C/AL Globals window:

    Text Constant
    ENU Value

    Text001
    'The closing date for %1 is %2.'


    This message appears:

    The closing date for C04/04/96 is C04/04/96.

    Hope this helps.

    Albert
  • iqbalmadiqbalmad Member Posts: 179
    ok.. let me put it another way...


    can i do a setrange or setfilter on closing dates only?????
  • AlbertvhAlbertvh Member Posts: 516
    Hi

    SETRANGE("Posting Date",CLOSINGDATE(FromDate),CLOSINGDATE(Todate));



    Albert
  • vijay_gvijay_g Member Posts: 884
    Albertvh wrote:
    Hi

    SETRANGE("Posting Date",CLOSINGDATE(FromDate),CLOSINGDATE(Todate));
    Albert
    suppose i have these dates... in DMY FORMAT
    010110
    C010110
    020110
    C020110


    if i write then it's working fine
    SETRANGE("Posting Date",CLOSINGDATE(010110D));

    output is -- C010110


    but...

    if i want to use setrange like

    SETRANGE("Posting Date",CLOSINGDATE(010110D),CLOSINGDATE(020110D));
    then it's showing all entries for
    C010110
    020110
    C020110

    How can i filter only on closingdate?
Sign In or Register to comment.