2 Replies Latest reply on Mar 18, 2014 11:34 PM by ZiteMedia

# Deduce 100 days from a given date

### Title

Deduce 100 days from a given date

### Post

Hi,

I have just one table and "givendate" is one of the fields and is of the "Date" type. I need to calculate another date which is 100 days before that givendate.

I've searched the forum and based on some answers i found on similar questions i came up with this formula:

Let ( D = Get ( givendate ) ; Date ( Day ( D ) - 100 ; Month ( D ) ; Year ( D ) ) )

When i try this i get an error message highlighting givendate and saying:

"This paramter is an invalid Get function parameter"

What's wrong?

Much appreciated

• ###### 1. Re: Deduce 100 days from a given date

Get function has specific parameters you can use. They are listed in FileMaker help and "givendate" isn't one of them.

Your calculation could be corrected by doing this:

Let ( D = givendate ; Date ( Day ( D ) - 100 ; Month ( D ) ; Year ( D ) ) )

But you can do this much simpler by simply using this expression:

givendate - 100

Note: in both of these examples, I am assuming that you are defining either a a calculation field with Date selected as the result type or a date field with an auto-enter calculation and that this new field is defined in the same table as your field named "givendate".

• ###### 2. Re: Deduce 100 days from a given date

Thanks a lot, that fixed it for me!