Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
hmichel@cox.net

Posts: 122
Registered: 1/29/05
Re: creation of date list
Posted: Feb 4, 2012 6:29 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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?
Please & Thanks in advance.








Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.