Default values in DateTime array / list

I wish to provide a default value for a DateTime variable. However, if I include the value within brackets (like I do for other arrays), it shows me an error message.

Does anybody know how to sort this out?

1 Like

Provide default values within convert.todatetime




just place it inside “2018-09-17” and convert it to datetime

You can use {DateTime.Parse("2018-09-17")}

1 Like

An array of datetimes can be done as {(new datetime(2018,9,17))}

In your example, the dateTimeVar would be new datetime(2018,9,17). The array would then be {dateTimeVar}

1 Like

Thanks everybody for your timely help :slight_smile:


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.