Number of days between two dates

Cannikin
Cannikin 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

  • DenSter
    DenSter 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 :)
  • Cannikin
    Cannikin Member Posts: 72
    LOL! I'm ashamed. :)

    Thanks very much!!
  • i-m-k
    i-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.
  • SteveO
    SteveO 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