SQL: DB2 date query problem....?
I want to display the ending date of a project and the estimated date. the ending date is the actual date that the project will end. now assuming that the ending date was delayed 10%,I want to display this date as estimated date.
how can I increase a date value by 10%?
example:
PROJNO - ENDING DATE - ESTIMATED DATE
MA21000 - Feb 1, 1983 - Mar 12, 1983.
Comments
If you are increasing by 10%, you are adding 10% with the hundred percent you already have. 110% = 1.1, so multiply the date by 1.1
One possible way you can do this (assumes you want to add 10% to remaining time - if you want increase of 10% of entire project time, use startDate instead of NOW):
SELECT projNo, endDate,
endDate + (1.1 * (endDate - NOW() DAYS)) DAYS AS "Estimated Date"
FROM...
go with unique or use and AND fact or Use and if / else in some center language to trim your effects. My wager is you may get what you want with go with unique. go with unique will in straight forward terms pull one get entry to for "Steve Johnson" if he shows up extra advantageous than as quickly as.. the difficulty you will desire to run in to is that if there is particularly extra advantageous than one Steve Johnson, so make useful your go with fact does the activity of particularly figuring out...