date difference using current date is no date is entered

G

Guest

I need to know how to find out the elapsed days between two dates. For
example:
Date Ordered:
Date Shipped:
Days to fulfill order:
If the date shipped is null (order has not been shipped yet) how do I get it
to fill in the current date automatically so that the days to fulfill order
does not come up as an error?
 
R

Rick B

Personally, I would not want to fill in the current date (and give a wrong
number) I would want it to remain blank.

Use an IF statement to say "if shipped is blank don't put anything"
 
G

Guest

Maybe I should have been alittle clearer, I don't what it to fill in a date
for the date shipped. I want the date shipped to stay open but fill in the
days to fulfill order.
 
G

Guest

I do not want it fill in the Date shipped with the current date, but I do
want the days to fulfill order to be a running total if the product has not
shipped yet.

How do I do that?

Ken Snell said:
The Nz function could be used:
Nz([Date Shipped], Date())

--

Ken Snell
<MS ACCESS MVP>

BetsyK said:
I need to know how to find out the elapsed days between two dates. For
example:
Date Ordered:
Date Shipped:
Days to fulfill order:
If the date shipped is null (order has not been shipped yet) how do I get
it
to fill in the current date automatically so that the days to fulfill
order
does not come up as an error?
 
K

Ken Snell [MVP]

Use the expression I gave you in the DateDiff function:

Numberofdays = DateDiff("d", [Date Ordered], Nz([Date Shipped], Date()))

--

Ken Snell
<MS ACCESS MVP>

BetsyK said:
I do not want it fill in the Date shipped with the current date, but I do
want the days to fulfill order to be a running total if the product has
not
shipped yet.

How do I do that?

Ken Snell said:
The Nz function could be used:
Nz([Date Shipped], Date())

--

Ken Snell
<MS ACCESS MVP>

BetsyK said:
I need to know how to find out the elapsed days between two dates. For
example:
Date Ordered:
Date Shipped:
Days to fulfill order:
If the date shipped is null (order has not been shipped yet) how do I
get
it
to fill in the current date automatically so that the days to fulfill
order
does not come up as an error?
 

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