Newbies LuisJ Posted September 27, 2010 Newbies Posted September 27, 2010 Hi everyone, First, I want to thank you all for your help, for the last year or so you did answer everything even before asking. I also want to add add that I've searched the whole forum(and the whole google) for this answer without luck, and hope is the right topic to post it. Basically I'm have a table called projects, with a fiel date for the start and field date for the finish. I wish the finish date to display the current date up until the moment that the project is finished, when somehow users should stamp the date (manually or button). The problem comes cause users should be able to introduce dates in the past (therefore stamp current or look up current wont be of help) as they might not update the date right on the day, or they might need to record old projects. Ideally I would like to have a "get current date" that you can stop from showing current and modify, but obviously a "get current date" is not modifiable...I cannot figure the way around this. Many thanks in advance for any help. Luis.
bcooney Posted September 27, 2010 Posted September 27, 2010 " I wish the finish date to display the current date up until the moment that the project is finished" I don't understand this request. Why would you want the finish date to contain any data if the project's not finished?
Newbies LuisJ Posted September 27, 2010 Author Newbies Posted September 27, 2010 Good question, There are many other fields depending on the length of the project. I have a field itself which is length counting days months and years ( project can be few days or several years), there are cost, reports and a whole bunch of things depending on the length, which depends on the "finish_date" field. Luis.
comment Posted September 27, 2010 Posted September 27, 2010 You need two fields for this: a FinishDate field (which can be either empty or contain the actual date when the project was finished), and a calculation field (unstored, result is Date) = Case ( FinishDate ; FinishDate ; Get (CurentDate ) )
Newbies LuisJ Posted September 27, 2010 Author Newbies Posted September 27, 2010 Brilliant, that's what I need. Thanks a lot! I just have a question, if something goes wrong or someone does a mistake, once you record the date you cannot start counting again (as is "get current" and that's not modifiable), would you know the way where users could reset the fiel to current again?? Thanks again anyway. Luis.
comment Posted September 27, 2010 Posted September 27, 2010 I am not sure I understand your question. If you make a mistake, you can delete the date in FinishDate, and the calculation field will show the current date again. BTW, I would probably do without the calculation field, and use the same formula directly where needed; for example, project duration = Case ( FinishDate ; FinishDate ; Get (CurentDate ) ) - StartDate
Newbies LuisJ Posted September 28, 2010 Author Newbies Posted September 28, 2010 Thanks for your reply Comment, While testing quickly the calculation I experienced some problems, is cause I asked, but you're right, and after playing for a while with it I got it to do exactly what I wanted with: If ( IsEmpty(date_finish) ; Get (CurrentDate ); date_finish )-date_start. Right in the calculation field for the length for the project. Thanks you very much for your help. Cheers, Luis.
Recommended Posts
This topic is 5228 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