%dw 2.0
import * from dw::util::Coercions
output application/dw
---
{
toPeriodEx1: toPeriod("P1D"),
toPeriodEx2: toPeriod("PT1H1M")
}
toPeriod
toPeriod(str: String): Period
Transform a String
value into a Period
value.
Introduced in DataWeave version 2.4.0.