AddDateTime adds two DateTime types and returns a new DateTime value. It takes two inputs:
| Property | Type | Description |
|---|---|---|
| Addend1 | DateTime | First DateTime. |
| Addend2 | DateTime | Second DateTime. |
Null-handling rules: if one of the parameters is null, the other will be returned. If both parameters are null then null will be returned.
A quick note on how to read this: despite both inputs being typed as "DateTime," in practice one of them is functioning as a duration/offset (e.g., a number of days/hours expressed as a DateTime value, or a DateTime that's really being used to hold an elapsed-time component) rather than as a true calendar date. Adding two genuine calendar dates together (e.g., Jan 1 2026 + March 5 2026) isn't typically meaningful, so this action is generally used when one side represents an offset to apply to the other.
Use case
A common scenario in EDI/B2B transformations: you receive an order document with a ship date, and you need to calculate an estimated delivery date by adding a fixed lead time (say, 5 days) to it. Or, in invoice processing, you take an invoice date and add a payment terms duration to compute a due date.
Example
Suppose a Ruleset needs to compute a "Promised Delivery Date" field for an outbound shipment confirmation:
- Addend1 = OrderDate (from source schema, e.g., 2026-06-30)
- Addend2 = a DateTime variable representing the lead time offset (e.g., constructed to represent "+5 days")
- Output → write the result to the target's PromisedDeliveryDate field
The Rule would look like:
PromisedDeliveryDate = AddDateTime(Addend1 = OrderDate, Addend2 = LeadTimeOffset)
If OrderDate happened to be null (e.g., missing on a malformed inbound document) but LeadTimeOffset was populated, the action would return LeadTimeOffset as-is per the null-handling rule — so in practice you'd typically pair this with validation logic upstream to make sure OrderDate is actually present before relying on the calculation.
Comments
0 comments
Please sign in to leave a comment.