Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: creation of date list
Replies: 5   Last Post: Feb 4, 2012 6:32 AM

 Messages: [ Previous | Next ]
 hmichel@cox.net Posts: 122 Registered: 1/29/05
Re: creation of date list
Posted: Feb 4, 2012 6:29 AM

Shippee:

Try

startDate = {1901, 1, 2};
endDate = {1991, 12, 13};
totDays = DateDifference[startDate, endDate];
Table[DateString[
DatePlus[
startDate, {i, "Day"}],
{"Month", "/", "Day", "/", "Year"}], {i, 0, totDays}]

{"01/02/1901", "01/03/1901", "01/04/1901", "01/05/1901", \
"01/06/1901", "01/07/1901", "01/08/1901", "01/09/1901", "01/10/1901", \
"01/11/1901", "01/12/1901", "01/13/1901", <<33194>>, "12/02/1991", \
"12/03/1991", "12/04/1991", "12/05/1991", "12/06/1991", "12/07/1991", \
"12/08/1991", "12/09/1991", "12/10/1991", "12/11/1991", "12/12/1991", \
"12/13/1991"}

Slow but not issues with forward slashes.

Hans
-----Original Message-----
From: shippee [mailto:slshippee@gmail.com]
Sent: Friday, February 03, 2012 1:12 AM
Subject: creation of date list

I need to create a list of dates which runs from:

01/02/1901
01/03/1901
01/04/1901
...
12/11/1991
12/12/1991
12/13/1991

but end up with a list of all those dates without the forward slash
"/" - any thoughts on the best way to approach this with Mathematica?

Date Subject Author
2/4/12 Ulrich Arndt
2/4/12 Stern
2/4/12 hmichel@cox.net
2/4/12 Bob Hanlon
2/4/12 James Stein