Re: creation of date list
- To: mathgroup at smc.vnet.net
- Subject: [mg124757] Re: creation of date list
- From: "Nasser M. Abbasi" <nma at 12000.org>
- Date: Sat, 4 Feb 2012 06:30:35 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <jgg1gp$bpp$1@smc.vnet.net>
- Reply-to: nma at 12000.org
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