Date subtraction

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.
 
K

KARL DEWEY

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.
 
J

John Spencer

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
 
S

Stephanie

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top