PC Review


Reply
Thread Tools Rate Thread

date difference using current date is no date is entered

 
 
=?Utf-8?B?QmV0c3lL?=
Guest
Posts: n/a
 
      7th Apr 2005
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?
 
Reply With Quote
 
 
 
 
Rick B
Guest
Posts: n/a
 
      7th Apr 2005
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"



"BetsyK" <(E-Mail Removed)> wrote in message
news:E795C2C1-EEB4-4DB0-88F7-(E-Mail Removed)...
> 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?



 
Reply With Quote
 
Ken Snell [MVP]
Guest
Posts: n/a
 
      7th Apr 2005
The Nz function could be used:
Nz([Date Shipped], Date())

--

Ken Snell
<MS ACCESS MVP>

"BetsyK" <(E-Mail Removed)> wrote in message
news:E795C2C1-EEB4-4DB0-88F7-(E-Mail Removed)...
>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?



 
Reply With Quote
 
=?Utf-8?B?QmV0c3lL?=
Guest
Posts: n/a
 
      7th Apr 2005
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.

"Rick B" wrote:

> 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"
>
>
>
> "BetsyK" <(E-Mail Removed)> wrote in message
> news:E795C2C1-EEB4-4DB0-88F7-(E-Mail Removed)...
> > 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?

>
>
>

 
Reply With Quote
 
=?Utf-8?B?QmV0c3lL?=
Guest
Posts: n/a
 
      7th Apr 2005
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 [MVP]" wrote:

> The Nz function could be used:
> Nz([Date Shipped], Date())
>
> --
>
> Ken Snell
> <MS ACCESS MVP>
>
> "BetsyK" <(E-Mail Removed)> wrote in message
> news:E795C2C1-EEB4-4DB0-88F7-(E-Mail Removed)...
> >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?

>
>
>

 
Reply With Quote
 
Ken Snell [MVP]
Guest
Posts: n/a
 
      7th Apr 2005
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" <(E-Mail Removed)> wrote in message
news:B65F5830-5E57-4B67-BB67-(E-Mail Removed)...
>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 [MVP]" wrote:
>
>> The Nz function could be used:
>> Nz([Date Shipped], Date())
>>
>> --
>>
>> Ken Snell
>> <MS ACCESS MVP>
>>
>> "BetsyK" <(E-Mail Removed)> wrote in message
>> news:E795C2C1-EEB4-4DB0-88F7-(E-Mail Removed)...
>> >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?

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
i have two date fileds Opend date Due date, can i set default on due date so, its always = to open date on my data entry form1 Urgent Mike Saifie Microsoft Access Form Coding 1 9th Mar 2006 01:08 AM
Calculate date difference between fixed date and current date Dave Elliott Microsoft Access Forms 3 23rd May 2005 03:54 AM
ERROR check if a date set entered violates a perviously entered date set buzz Microsoft Excel Misc 0 16th Jun 2004 07:13 PM
ERROR check if a date set entered violates a perviously entered date set buzz Microsoft Excel Misc 0 16th Jun 2004 07:11 PM
Check that the date entered is the current date allie Microsoft Access Form Coding 3 5th May 2004 04:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:16 AM.