End of Calendar Year

sabzamsabzam Member Posts: 1,149
What is the easiest way to define the end of year of that set date. For e.g. if the posting date is set to 01/04/2011 then the result should be 31/12/11 in date format?

Comments

  • SogSog Member Posts: 1,023
    edited 2012-04-27
    better solution below
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • jglathejglathe Member Posts: 639
    Hi,

    Calcdate('<CY>',yourdate) should do this, too.

    with best regards

    Jens
  • DenSterDenSter Member Posts: 8,305
    jglathe wrote:
    Calcdate('<CY>',yourdate)
    This is the best way to do that :thumbsup:
  • sabzamsabzam Member Posts: 1,149
    Very good, thanks alot.
  • DenSterDenSter Member Posts: 8,305
    Sog wrote:
    better solution below
    Why did you delete your original solution? Just because there's something else out there doesn't mean yours would not have worked.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    DenSter wrote:
    Sog wrote:
    better solution below
    Why did you delete your original solution? Just because there's something else out there doesn't mean yours would not have worked.

    I agree, often there are "wrong solutions" posted here that need to be removed, but your code is not wrong, and shows a different aspect of the requirement. Your code is more versitle and covers something different.

    Of course I do love CALCDATE and some of the cool things you can do with it, so it is the way I would do it :mrgreen:
    David Singleton
Sign In or Register to comment.