Create a list of dates from two dates input

How to make a list of Dates from Two dates?
e.g, 02-07-2022 and second date is 02-08-2022
I want a list having the range form these two dates
e.g., it should look like this:
02-07-2022
03-07-2022
04-07-2022
.
.
so on to
01-08-2022
02-08-2022

Please refrain from making duplicate post

That was another case. please see the solution and then comment.
It is another query.
Date+ Time span= List of dates
Date + Date = List of dates, is another query.

Maybe a better answer this time :slight_smile:
DesignScriptGuideV2.1.pdf (343.2 KB)
designscript-final.pdf (1.5 MB)
DesignScriptDocumentation.pdf (705.5 KB)

I am afraid, it did not help.
Please give a direct solution, else I will wait some one else to comment.

Hello,
Mr. Daan you put on the way it seemed to me, Dynamo dictionnary helps me a lot, in addition to the documents of Mr. Marcel.
All advice is always of great interest.

Cordially
christian.stan

Hi, can you please change this code to insert another date and get a list of dates?
i.e., I need a range of dates from 04-11-2022 to 10-11-2022.
Please guide.


Cordially
christian.stan

1 Like

please try to understand,
Two dates as input not the span.
like One input= 04-11-2022
and other input= 10-12-2022
and get a list.
not with 6 days as input.
Thank you for response, though :slight_smile:

A little more accomplished

Cordially
christian.stan

4 Likes

Based on the question and the way you’re describing it, List.Create would do the trick.

If it’s not that and not what @christian.stan has posted you’ll need to post something much more specific in terms of "have 1/1/2022 and 1/3/2022, want to get _____ in return.

Although it is working, but it is giving me an error i.e.,Warning: DateTime.FromString operation failed.
String was not recognized as a valid DateTime.

Looks like you have some invalid data heading into the Datetime.FromString node. Check all the resulting data to see which index is failing, and review the input at that index. Might be a formatting issue in the input, or it might be that you’ve pulled in a null value with the input.

1 Like

Many thanks for this.

1 Like