Function StringToMoment(Format, Unit, ReferenceDate, Timeslot)

StringToMoment

The function StringToMoment converts a given time string (in a free time format) to the elapsed time with a respect to a specific reference date.

StringToMoment(
     Format,             ! (input) a string expression
     Unit,               ! (input) a time unit
     ReferenceDate,      ! (input) a string expression
     Timeslot            ! (input) a string expression
     )

Arguments

Format

A string that holds the date and time format used in the fourth argument Timeslot. Valid format strings are described in Format of Time Slots and Periods

Unit

The time unit that is used to return the elapsed time.

ReferenceDate

A string that holds the begin date using the fixed format for date and time, see paragraph Reference date format of the Language Reference.

Timeslot

A string representing a specific date and time moment using the format specified in the first argument Format.

Return Value

The result of StringToMoment is the elapsed time in unit between reference-date and date.

See also

The functions MomentToString, CurrentToMoment.