Getting list of dates


I am trying to write a " List< DataTime > " variable and just unsure of the structure.

I have the below. I want to add more dates to the list?

Refer this

1 Like

This is for a list of strings? How would i do it for a list of dateTime ?

init the list with new list(of dateTime)
adding elements to the list can be done with add to collection activiy

1 Like

Hi @fflattery

Create a list of DateTime variable and Initialize like List (of DateTime) to add date to the collections of list use Add to collection Activity,


Thanks, i think i have it… Ca you add multiple items to the collection or its it just one?

1 Like

one by one with this activity
with following trick multiples can be added

we just put the multiple dateTimeVars which we want to add to an array and used the concat method

you can add anynumber of items

within the one activity? How do you separate the dates?


1 Like

if you have multiple dates, you can use For each Loop to add into your collections.

do the following:

  • For Each Loop, Input as Multiple dates
  • Inside loop use Add to Collection Activity

once done, if you want to check the list of dates available in your collection use this String.Join(",",listOfDate)

1 Like

Your code is correct!
What is problem?