Date subtraction

  • Thread starter Thread starter Stephanie
  • Start date Start date
S

Stephanie

Hi.
I'm trying to perform a date subtraction between incident date and discovery
date, but I can't get the syntax correctly. I'd like to have the output in
"days".

Could you please provide guidance on how to use the date function. Thanks.
 
DateDiff("d", [Incident], [Discovery])
If they are the same day then the above will result in 0 (zero) as there is
no difference.
DateDiff("d", [Incident], [Discovery])+1
This will give you one day if they are the same day.
 
Use the DateDiff function.

DateDiff("d",[Incident Date],[Discovery Date])



John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Thanks!

KARL DEWEY said:
DateDiff("d", [Incident], [Discovery])
If they are the same day then the above will result in 0 (zero) as there is
no difference.
DateDiff("d", [Incident], [Discovery])+1
This will give you one day if they are the same day.
--
Build a little, test a little.


Stephanie said:
Hi.
I'm trying to perform a date subtraction between incident date and discovery
date, but I can't get the syntax correctly. I'd like to have the output in
"days".

Could you please provide guidance on how to use the date function. Thanks.
 
Back
Top