Count Days from beginning year

-matrix--matrix- Member Posts: 103
Hi Guys,

I have a question..

I need to calculate the number of days from the begin year to a Fixed Date..

Do you know any standard function?

Thanks in advance

Answers

  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    NoOfDays := YourDate - CALCDATE('<-CY>',YourDate);
    
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • krikikriki Member, Moderator Posts: 9,110
    or also:
    NoOfDays := YourDate - DMY2DATE(1,1,DATE2DMY(YourDate,3));
    

    As you see, generally there is more than 1 way to get what you want. And sometimes there is a good, a better and a worse solution. And in this case they are both good solutions.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • -matrix--matrix- Member Posts: 103
    Thanks they' re great solutions =D>
Sign In or Register to comment.