Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #8327

Re: creation of date list

From "Hans Michel" <hmichel@cox.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: creation of date list
Date 2012-02-04 11:29 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jgj4rh$mtr$1@smc.vnet.net> (permalink)
References <201202030712.CAA12063@smc.vnet.net>

Show all headers | View raw


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.



Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: creation of date list "Hans Michel" <hmichel@cox.net> - 2012-02-04 11:29 +0000

csiph-web