MySQL Forums
Forum List  »  Newbie

Allocation a fixed number of days to a date script
Posted by: LAM Marks
Date: February 05, 2014 07:36AM

How do I add 2 days to the following:

If this is the order date
LEFT(oh.ORDDATE, 4) + '/' + SUBSTRING(CAST(oh.ORDDATE AS CHAR(20)), 5, 2) + '/' + RIGHT(oh.ORDDATE, 2) AS "Order Date",

And this is the Requested Date
CASE
WHEN od.EXPDATE <> 0 THEN LEFT(od.EXPDATE, 4) + '/' + SUBSTRING(CAST(od.EXPDATE AS CHAR(20)), 5, 2) + '/' + RIGHT(od.EXPDATE, 2)
WHEN oh.EXPDATE <> 0 THEN LEFT(oh.EXPDATE, 4) + '/' + SUBSTRING(CAST(oh.EXPDATE AS CHAR(20)), 5, 2) + '/' + RIGHT(oh.EXPDATE, 2)
ELSE LEFT(oh.ORDDATE, 4) + '/' + SUBSTRING(CAST(oh.ORDDATE AS CHAR(20)), 5, 2) + '/' + RIGHT(oh.ORDDATE, 2)
END AS "Requested Date",

How do I change this script to have the Requested Date = to the order date + 2 days?

Options: ReplyQuote


Subject
Written By
Posted
Allocation a fixed number of days to a date script
February 05, 2014 07:36AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.