What I have:
I have a timestamp field with the time that my project started
The user is updating the project with the % complete (1 to 100 not .01 to 1)
I want to insert into an updates table with an estimated completion timestamp.
Basic math:
How to get the full time of the project:
(now() - start timestamp) * (100 / percent complete)
End Time:
start timestamp + full time of the project estimated above
I then need to insert the end time estimated into the table during the insert.
I think i’ve got it.
that returns:
2012-08-30 17:28:41
the 33 would be the %, and the other timestamps are the start time. Works perfect.