JTSmith Posted January 14, 2011 Posted January 14, 2011 I'm sure it's fairly simple, but I'm new to this FM stuff, and I have two dates, Move In and Move Out, and I need to calculate the days between two dates. I just need a whole number. I appreciate any help!
Søren Dyhr Posted January 14, 2011 Posted January 14, 2011 I'm sure it's fairly simple, but I'm new to this FM stuff, and I have two dates, Move In and Move Out, and I need to calculate the days between two dates. I just need a whole number. I appreciate any help! It is indeed, what you need to know is that each date corresponds to a certain integer, today is 734151 - what integer do you think tomorrow is? The issue here is to make the result receiving field an appropriate type ... I would suggest number in this case --sd
Tim W Posted January 14, 2011 Posted January 14, 2011 It is as Soren describes, so move_outDate - move_inDate = number of days elapsed. HTH Tim
JTSmith Posted January 14, 2011 Author Posted January 14, 2011 Ok, I feel stupid now, I thought I tried that and it didn't work, but I just did and it works. Quick question though, is it possible to not show a number if it's negative? I have a field that is "Days Until Move In", which shows: 5 days, 4 days, etc, but after they move in it goes negative, so I'd like to say something like "Moved In" if the result is less than zero. I currently have: Move In Date - Get (CurrentDate) and I'd like to say something like If less than 0 then say "Moved In". Thanks for the help guys.
Tim W Posted January 14, 2011 Posted January 14, 2011 Ok, I feel stupid now, I thought I tried that and it didn't work, but I just did and it works. Quick question though, is it possible to not show a number if it's negative? I have a field that is "Days Until Move In", which shows: 5 days, 4 days, etc, but after they move in it goes negative, so I'd like to say something like "Moved In" if the result is less than zero. I currently have: Move In Date - Get (CurrentDate) and I'd like to say something like If less than 0 then say "Moved In". Thanks for the help guys. No problem, We all have to learn the basics, best way to learn .... Keep asking questions. Use a Let and a case statement as the field formula like so.... Let( dys = Move_In_Date - Get(CurrentDate); Case( dys > 0; dys & " Days"; "Moved In") ) Look up these two functions in help to get the syntax so you understand how to use them. They are very useful and learning them will be worth much more than the effort. HTH, Tim
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now