Skip to main content
Version: v0.17.0

StringToDate

Alias:StringToDate, ConvertStringToDate, ToDate

Output:SCLDateTime

Converts a date to the specified format, yyyyMMddHHmm by default. If no date is specified, returns the current time.

ParameterTypeRequiredPositionDefault ValueExampleSummary
Date
String
string12020/11/22 20:55:11The string to convert to DateTime
InputFormat
Format
string2Will use DateTime to try and convert.yyyy/MM/dd HH:mm:ssThe input format to use for conversion. If not set, will use DateTime.Parse by default.
Culturestring3Current cultureen-GBThe culture to use for date conversion. Default is current culture.

Examples

SCL

StringToDate '2020/10/20 20:30:40'

Expected Output

2020-10-20T20:30:40.0000000