Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Date Formatting

  • To: mathgroup at smc.vnet.net
  • Subject: [mg129036] Re: Date Formatting
  • From: azzteke <klaus.giesselmann at web.de>
  • Date: Sun, 9 Dec 2012 11:02:17 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <k9umme$sia$1@smc.vnet.net>

> 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




  • Prev by Date: Re: Mathematica 9.0.0.0 for windows crash
  • Next by Date: Re: Interactively placing points onto 3D surfaces
  • Previous by thread: Re: Date Formatting
  • Next by thread: cell merge bug not only when merging cells