MathGroup Archive 2012

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

Search the Archive

Re: creation of date list


On 2/3/2012 1:14 AM, shippee wrote:
> 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.
>
>

Not sure if I understood you, but here we go:

-----------------------------------------------
data = {"01/02/1901", "01/03/1901", "01/04/1901"};
StringJoin[StringCases[#, RegularExpression["[0-9]"]]] & /@ data
-----------------------------------------------

{"01021901", "01031901", "01041901"}

--Nasser







  • Prev by Date: Re: creation of date list
  • Next by Date: Re: creation of date list
  • Previous by thread: Re: creation of date list
  • Next by thread: Re: creation of date list