Wednesday, December 25, 2024

OIC - How to add days to date YYYY-MM-DD using prebuilt functions

Use Case: 

Adding a Specific Number of Days to a Database Fetched Date in the Format YYYY-MM-DD

Logic Steps:

  1. Convert the input date (in YYYY-MM-DD format) to a date object using the date() function.
  2. Add the required number of days using the dayTimeDuration("P10D") function (e.g., for 100 days, use "P100D").
  3. Finally, convert the result back to a string using the string() function.

Solution :

string((xsd:date(/nstrgmpr:execute/ns20:request-wrapper/ns20:inputDate) + xsd:dayTimeDuration("P10D")))



No comments:

Post a Comment

Featured Post

OIC - Using Dynamic Paths for OCI Object Storage in OIC Integrations | Handling “Subfolders” in OCI Object Storage bucket

Use Case In Oracle Integration Cloud (OIC), when working with Oracle Object Storage, “folders” inside a bucket are not real directories . T...