Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #8346
| From | Ray Koopman <koopman@sfu.ca> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: creation of date list |
| Date | 2012-02-04 11:39 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jgj5dn$n52$1@smc.vnet.net> (permalink) |
| References | <jgg1gp$bpp$1@smc.vnet.net> |
On Feb 2, 11:14 pm, shippee <slship...@gmail.com> 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.
StringTake["0"<>ToString@#,-8]& /@ (DaysPlus[{1901,1,2},#]& /@
Range[0,DateDifference[{1901,1,2},{1991,12,13}],563].{1,1*^6,1*^4})
{"01021901","07191902","02021904","08181905","03041907","09171908",
"04031910","10181911","05031913","11171914","06021916","12171917",
"07031919","01161921","08021922","02161924","09011925","03181927",
"10011928","04171930","11011931","05171933","12011934","06161936",
"12311937","07171939","01301941","08161942","03011944","09151945",
"04011947","10151948","05011950","11151951","05311953","12151954",
"06301956","01141958","07311959","02131961","08301962","03151964",
"09291965","04151967","10291968","05151970","11291971","06141973",
"12291974","07141976","01281978","08141979","02271981","09131982",
"03291984","10131985","04291987","11121988","05291990","12131991"}
To get all the days, delete the ",563" in the code.
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