Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #12706

Re: Date Formatting

From azzteke <klaus.giesselmann@web.de>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Date Formatting
Date 2012-12-09 15:58 +0000
Message-ID <ka2cfr$7gs$1@smc.vnet.net> (permalink)
References <k9umme$sia$1@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


> When using the DateListPlot function, Mathematica does recognize this date format as a date, as long as you put each data point into the formula individually, and put quotations around them, e.g.:
> 
> DataListPlot[{1,2},{"Mar-28-2008", "Apr-03-2009"}] works as a function, BUT if you set {"Mar-28-2008", "Apr-03-2009"}=dates, and use DataListPlot[{1,2},{dates}], it doesn't work. 
> 
> Anyone have ideas on how to reformat the dates so it works? It appears that there's some sort of disconnect when the dates are entered into a series.

Hello bigchap,
there are a couple of mistakes. Your assignment '{"Mar-28-2008", "Apr-03-2009"}=dates' is wrong - should be: name = value.
Then, DataListPlot[{1,2},{dates}] doesn't work, because (a) the name of the function is to be "DateListPlot" and (b) you put 'dates' in between curly brackets.

Regards
azzteke

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Date Formatting bigchap86 <ross.d.chapman@gmail.com> - 2012-12-08 06:28 +0000
  Re: Date Formatting James Choi <sabio@isabio.com> - 2012-12-09 15:58 +0000
  Re: Date Formatting azzteke <klaus.giesselmann@web.de> - 2012-12-09 15:58 +0000

csiph-web