# How many days between two dates calculation?

This topic is 4404 days old. Please don't post here. Open a new topic instead.

## Recommended Posts

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!

##### Share on other sites

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

##### Share on other sites

It is as Soren describes, so move_outDate - move_inDate = number of days elapsed.

HTH

Tim

##### Share on other sites

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.

##### Share on other sites

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

##### Share on other sites

Huge help. I appreciate all the info.

##### Share on other sites

This topic is 4404 days old. Please don't post here. Open a new topic instead.

## Create an account

Register a new account