Monday, December 28, 2009

SQL - Unexpected Token "date/interval" - DB2

Question:
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 50%,I want to display this date as estimated date.

how can I increase a date value by 50%?

example:
PROJECTNO - ENDING DATE - ESTIMATED DATE
PROJ10001 - Jan 26, 1986 - Mar 12, 1986.



Answer:
If you are increasing by 50%, you are adding 50% with the hundred percent you already have. 150% = 1.5, so multiply the date by 1.5