June 2, 200520 yr 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.
June 2, 200520 yr 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
June 2, 200520 yr Author 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.
June 2, 200520 yr If a calculation referencing Get(CurrentDate) (or any Get function, for that matter) is unstored (as LaRetta specified), then it will be updated automatically.
Create an account or sign in to comment