Number of days between two dates

CannikinCannikin Member Posts: 72
Howdy all. I'd like to display the total number of days between two dates. For example, TODAY - 6/15/04 = 16. I want to display just the 16.

I thought maybe CALCDATE was what I needed, but that just returns another date. Help! :)

Comments

  • DenSterDenSter Member Posts: 8,307
    NumberOfDays := DateOne - DateTwo;
    

    where DateOne and DateTwo are Date type variables, and NumberOfDays is a decimal.

    yes it is that easy :)
  • CannikinCannikin Member Posts: 72
    LOL! I'm ashamed. :)

    Thanks very much!!
  • i-m-ki-m-k Member Posts: 1
    Cannikin wrote:
    LOL! I'm ashamed. :)

    Thanks very much!!

    Be noticed that result not decimal or integer. if I remember, Result is DURATION type. Read help about this datatype.
    IMHO just so.
  • SteveOSteveO Member Posts: 164
    DURATION is the return type when 2 DATETIME variables are involved.
    This isn't a signature, I type this at the bottom of every message
Sign In or Register to comment.