IngameDateTime_Dev > Ingame Calendar > Make Duration

Make Duration

Creates a duration from a string of the form: P1|...|P2[.F], where each '|' is the duration separator specified in the calendar for the unit following.
Not all units need be specified, however in contrast to dates, for durations the input is parsed from the smallest unit to the largest.

NOTE: Formatting hints will be given on the blueprint node if the type of connection plugged into the Target pin is the exact calendar you are using.
For example, if you use the GregorianCalendar, but access it through the global ingame calendar/clock nodes, hints will only appear if you cast to GregorianCalendar
before plugging into this node. Recommended practice is to add a variable to whichever blueprint is using this node, of your specific calendar type. Then access the
global calendar in BeginPlay, cast it, and store it in your variable. You can then use this variable for all accesses to the calendar.

Examples:
"7:00:00:00" - a duration of one week
"1:00.5" - 1 minute and half a second
"10" - 10 seconds (as second is the smallest defined period)

Inputs

Target
Ingame Calendar Object Reference

Duration
String

Input duration string

Outputs

Return Value
Ingame Duration Structure

Duration value corresponding to the input string