Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Hi everyone,

Can someone tell me how to insert today's date (dynamically updated daily) into a field?.

I want to be able to calculate the "days remaining" for a particular task to be accomplished. I also have another field that contains the number of days the task should be completed in, which I enter at the time of the creation of the task. I then want to be able to look at the days remaining field to see how many days I have left to complete the given task.... I also have a field for the date the task was created on. I figured I would need to know "today's date" in order to see the remaining days. How do I do this? I did see a script step to Insert Current Date, but I can't seem to figure out how to execute the script or calculation automatically without my intervention, can you help? (or is this one of FM's shortcomings that I have heard for a while - that it can not execute stored procedures?) Please enlighten me!! Thanks!

Just in case you are wondering, the database is not for my personal procrastination reasons! ???) It's for keeping track of the dated events in my clients' real estate contracts/transactions!

Thanks!

Kenneth.

Posted

Hi Kenneth,

Fields:

CreationDate (date)

DaysCompletedIn (number)

Then create calculation (number) with:

(CreationDate + DaysCompletedIn) - Get(CurrentDate)

Or you can make the calculation text with:

(CreationDate + DaysCompletedIn) - Get(CurrentDate) & " days remaining"

Be sure these calculations are unstored in the Storage Options.

LaRetta wink.gif

Posted

LaRetta,

Thanks for the post. My question though is this: If tomorrow I go look at the currentDate field it will still have todays date not tomorrow's date correct? (granted, one might not want dynamically updating fields in a database (mostly) but I don't mind creating a hidden field or a global field just to store the current date). My question was more specifically, how do I get the current date to be truly current as of everyday in the same record that I created a few days ago. Again, my whole purpose is to have the calculated "days remaining" to be decremented automatically everyday, from the time I created the record. I don't know if you answered this particular senario in your reply...... sorry if I didn't understand. However I will try your suggestion/calculation....

Kenneth.

Posted

If a calculation referencing Get(CurrentDate) (or any Get function, for that matter) is unstored (as LaRetta specified), then it will be updated automatically.

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.