How to get Date Filter (Last Month) ??

bangswitbangswit Member Posts: 265
Hi all , i want to modified form Chart Of Accounts (form 16)
so there will be a field beside net change that show Last Month Net change
for example I give date filter 02/15/09..02/28/09
so the the net change date filter should be 02/15/09..02/28/09
and new field (lAst month net change) should be 01/15/09..01/28/09

how to do that?
thanks

Comments

  • ProcatProcat Member Posts: 31
    Something along the lines of CALCDATE('<-CM-1M>', StartDate) and CALCDATE('<+CM-1M>', EndDate) might help you.
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    That would end up to 01/01/09..01/28/09. I guess you thought he wants to get the range of the whole previous month. But for that your description isn't correct. That would be <-1M+CM> for the last day of the previous month. But that's not what he wants to achieve.

    You could use GETRANGEMIN and GETRANGEMAX to get the range minimum and range maximum of the filter. If you just want to apply the same range to the previous month, then you could use
    CALCDATE('<-1M>', StartDate);
    
    But I believe you have to think about what you want to do if one of the dates is a day that doesn't exist in the previous month.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
Sign In or Register to comment.