Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: creation of date list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124750] Re: creation of date list
  • From: "Hans Michel" <hmichel at cox.net>
  • Date: Sat, 4 Feb 2012 06:28:10 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201202030712.CAA12063@smc.vnet.net>

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 at gmail.com] 
Sent: Friday, February 03, 2012 1:12 AM
To: mathgroup at smc.vnet.net
Subject: [mg124750] 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.






  • Prev by Date: Re: Problem using Solve or Nsolve
  • Next by Date: Re: creation of date list
  • Previous by thread: Re: creation of date list
  • Next by thread: Re: creation of date list