PC Review


Reply
Thread Tools Rate Thread

Calculating Days using code

 
 
=?Utf-8?B?TGV2YW5zIGRpZ2l0YWw=?=
Guest
Posts: n/a
 
      21st Apr 2006
I need assistance with the following. I have five Fields and must Calculate
Storage Days.

Date Received (Date/Time)
Date Stuffed (Date/Time)
Date Delivered (Date/Time)
Date Shipped (Date/Time)
Storage Days (Number, Calculated Field)

Here is what I want to accomplish:
If Date Received, Date Delivered and Date Shipped has value then Calculate
Storage Days (Which would be the difference between Received and Delivered
Dates)
Then If Date Received, Date Stuffed and Date Shipped has values then
calculate Storage Days (Which would be the difference Stuffed and Shipped
Dates)

Thanks

 
Reply With Quote
 
 
 
 
=?Utf-8?B?S2xhdHV1?=
Guest
Posts: n/a
 
      21st Apr 2006
If Not IsNull([Date Received]) Then
If Not IsNull([Date Delivered]) And Not IsNull([Date Shipped]) Then
[Storage Days] = DateDiff("d", [Date Received], [Date Delivered]
Elseif Not IsNull([Date Stuffed] And Not IsNull([Date Shipped]) Then
[Storage Days] = DateDiff("d", [Date Stuffed], [Date Shipped]
End If
End If


"Levans digital" wrote:

> I need assistance with the following. I have five Fields and must Calculate
> Storage Days.
>
> Date Received (Date/Time)
> Date Stuffed (Date/Time)
> Date Delivered (Date/Time)
> Date Shipped (Date/Time)
> Storage Days (Number, Calculated Field)
>
> Here is what I want to accomplish:
> If Date Received, Date Delivered and Date Shipped has value then Calculate
> Storage Days (Which would be the difference between Received and Delivered
> Dates)
> Then If Date Received, Date Stuffed and Date Shipped has values then
> calculate Storage Days (Which would be the difference Stuffed and Shipped
> Dates)
>
> Thanks
>

 
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
Conditional Formatting Dates calculating 10 days and 30 days from a certain date Sioux Microsoft Excel Worksheet Functions 2 11th Oct 2007 02:04 PM
Days per month for calculating storage days Bart Microsoft Excel Worksheet Functions 3 31st Jan 2007 06:40 PM
Calculating Days using code =?Utf-8?B?TGV2YW5zIGRpZ2l0YWw=?= Microsoft Access 0 21st Apr 2006 06:49 PM
Calculating recurring date in following month, calculating # days in that period Walterius Microsoft Excel Worksheet Functions 6 4th Jun 2005 11:21 PM
Calculating # of busn days, not just calendar days, between 2 dates? StargateFanFromWork Microsoft Excel Programming 1 29th Jun 2004 08:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:48 AM.