Get No. of Days from dates

tiagofrancistiagofrancis Member Posts: 48
Hi folks,

what is the best way to get the no. of days from a date.

i've to subtract to dates and store the difference in days on an integer.

Thanks in advance.

Comments

  • AlbertvhAlbertvh Member Posts: 516
    Hi,

    If you don't want to have weekends, holidays etc you will have to check in the base calendar. There are a few topics on this.

    If you only want days regardless of the above then yes you can use what you suggested in your post.


    Albert
  • tinoruijstinoruijs Member Posts: 1,226
    You can just use:
    intNoOfDays := datLastDate - datFirstDate;
    

    Tino Ruijs
    Microsoft Dynamics NAV specialist
Sign In or Register to comment.