Learn about Redwood and be one of the first to join the conversation

Visit Redwood Community
Problem with adding days in a date(sql) — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Problem with adding days in a date(sql)

38
Views
3
Comments
edited Mar 23, 2017 6:40AM in General Transactional Reporting (OTBI) 3 comments

Summary

Problem with adding days in a date (sql)

Content

Hi All,

I’m building a bi report and I have the following problem when building the data model.

Oracle provides ADD_MONTHS() function to use when adding duration to a date the function takes two parameters:

  1. Date
  2. Integer                                                                                                                                                              

i.e. ADD_MONTHS(28- Feb-2017,5) 

More over if you directly add a number to a date like (‘23 - Mar – 2017’)+ 40 this is automatically taken as adding 40 days to that date.

What can I do if the duration I want to add is in a decimal value e.g. 8.9 months because the ADD_MONTHS() function fail in this case?

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!