marconey Posted June 2, 2005 Posted June 2, 2005 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.
LaRetta Posted June 2, 2005 Posted June 2, 2005 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
marconey Posted June 2, 2005 Author Posted June 2, 2005 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.
-Queue- Posted June 2, 2005 Posted June 2, 2005 If a calculation referencing Get(CurrentDate) (or any Get function, for that matter) is unstored (as LaRetta specified), then it will be updated automatically.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now