subtract dates

  • Thread starter Thread starter a
  • Start date Start date
A

a

Thank you
begin date end date subtract number in days
1/1/2004 5/1/2004 4
15/1/2004 20/1/2004 5

I want (question):
When subtract date display result in dates not number
Example:
1/1/2004
2/1/2004
3/1/2004
4/1/2004
 
Thank you
begin date end date subtract number in days
1/1/2004 5/1/2004 4
15/1/2004 20/1/2004 5

I want (question):
When subtract date display result in dates not number
Example:
1/1/2004
2/1/2004
3/1/2004
4/1/2004

Use the DateDiff function:

NumberInDays: DateDiff("d", [begin date], [end date])

A Date/Time field is stored as a Double Float number, a count of days
and fractions of a day since midnight, December 30, 1899. Recheck your
example: I suspect that if you subtract 1/1/2004 from 1/5/2004 (using
American date formatting, which is *REQUIRED* if you use literal dates
in SQL queries) you will get #1/3/1900# and not any date in 2004!
 
Mr John w. vinson [MVP]
thank you for your help and answer:
but I want to tell you that your answer also give me subtaction by number
not dates:






John Vinson said:
Thank you
begin date end date subtract number in days
1/1/2004 5/1/2004 4
15/1/2004 20/1/2004 5

I want (question):
When subtract date display result in dates not number
Example:
1/1/2004
2/1/2004
3/1/2004
4/1/2004

Use the DateDiff function:

NumberInDays: DateDiff("d", [begin date], [end date])

A Date/Time field is stored as a Double Float number, a count of days
and fractions of a day since midnight, December 30, 1899. Recheck your
example: I suspect that if you subtract 1/1/2004 from 1/5/2004 (using
American date formatting, which is *REQUIRED* if you use literal dates
in SQL queries) you will get #1/3/1900# and not any date in 2004!
 
Back
Top