Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to count days elapsed since ship date? 1

Status
Not open for further replies.

sammylieb

IS-IT--Management
Joined
May 31, 2005
Messages
1
Location
US
I am new to filemaker pro. I have a text field that notes the shipping date of an item in my inventory. I want another text field to display the number of days that have elapsed since that ship date. I have implemented this code:

If(
GetAsText( Day(Get(CurrentDate)) - Day(Ship date) ) = "1";
GetAsText( Day(Get(CurrentDate)) - Day(Ship date) ) & " Day";
GetAsText( Day(Get(CurrentDate)) - Day(Ship date) )
)

This shows number of days that have elapsed, but doesn't work as the month changes. It's counting the days, but not calculating the count correctly as the month changes. How can I calculate this correctly?

Thank you very much.

Sam
 
Try using DayOfYear instead of Day function


John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top