new_date - old_date = how many day ?

  • Thread starter Thread starter skech
  • Start date Start date
skech said:
Hi,
How to find how many day between dates?

Depends on how you define "between" and how the time-of-day should be
handled.

dim ts as timespan
dim d1, d2 as date
d1 = #10/18/2003#
d2 = #10/16/2003#
ts = d2.subtract(d1)

The Timespan will return 2 days difference, whereas there's only 1 day
between the two days.
Sorry for my english :)

Sorry for mine, too. ;)
 
Hi

DATEDIFF(DAY, old_date, new_date) will give the number of days
Similarly DATEDIFF(MONTH, old_date, new_date) will give the number of
months.

Hemanth
 
Back
Top