kevinwilson
Technical User
Aloha,
I would appreciate whatever help anyone can provide on this one. Here's my problem: I have two fields [ReceivedDate] and [ShippedDate], both are "General Date" format. I would like to calculate the amount of days it took for the item to be shipped. The code below works fine as long as the user doesn't add hours, minutes, and seconds to the equation.
If the user enters dates only then it works, 3/15/2002-3/10/2002="5 days to ship".
However if the user enters date/time then the code below doesn't work, 3/15/2002 9:52:33 AM - 3/10/2002="*fraction* days to ship".
Seems simple enough, this is what I did:
Created a text box and added this code "=[ShippedDate]-[ReceivedDate]&" days to ship"". This works for date fields but when the user enters dates/time then the returned results are displayed in fractions.
It's too late for me to change the date/time format for the existing fields. How can I code a text box to strip out the hour/min/sec so that it does not return days into fractions?
Much mahalo's
Kevin
I would appreciate whatever help anyone can provide on this one. Here's my problem: I have two fields [ReceivedDate] and [ShippedDate], both are "General Date" format. I would like to calculate the amount of days it took for the item to be shipped. The code below works fine as long as the user doesn't add hours, minutes, and seconds to the equation.
If the user enters dates only then it works, 3/15/2002-3/10/2002="5 days to ship".
However if the user enters date/time then the code below doesn't work, 3/15/2002 9:52:33 AM - 3/10/2002="*fraction* days to ship".
Seems simple enough, this is what I did:
Created a text box and added this code "=[ShippedDate]-[ReceivedDate]&" days to ship"". This works for date fields but when the user enters dates/time then the returned results are displayed in fractions.
It's too late for me to change the date/time format for the existing fields. How can I code a text box to strip out the hour/min/sec so that it does not return days into fractions?
Much mahalo's
Kevin