Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #8349
| From | A Retey <awnl@gmx-topmail.de> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: creation of date list |
| Date | 2012-02-05 11:02 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jglnk0$2bf$1@smc.vnet.net> (permalink) |
| References | <jgg1gp$bpp$1@smc.vnet.net> |
Am 03.02.2012 08:14, schrieb shippee:
> 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.
I think you didn't manage to make clear which direction you actually
want to go. Here are possibilities for either way:
list1 = StringSplit["01/02/1901
01/03/1901
01/04/1901
12/11/1991
12/12/1991
12/13/1991", "\n"]
list2 = StringReplace[list1, "/" -> ""]
list3 = StringReplace[list2,
RegularExpression["([0-9]{2})([0-9]{2})([0-9]{4})"] -> "$1/$2/$3"]
hth,
albert
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
creation of date list shippee <slshippee@gmail.com> - 2012-02-03 07:14 +0000
Re: creation of date list "Nasser M. Abbasi" <nma@12000.org> - 2012-02-04 11:33 +0000
Re: creation of date list Ray Koopman <koopman@sfu.ca> - 2012-02-04 11:39 +0000
Re: creation of date list A Retey <awnl@gmx-topmail.de> - 2012-02-05 11:02 +0000
Re: creation of date list Murta <rodrigomurtax@gmail.com> - 2012-02-13 08:42 +0000
csiph-web