Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12717
| From | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Date Formatting |
| Date | 2012-12-09 15:58 +0000 |
| Message-ID | <ka2cfg$7go$1@smc.vnet.net> (permalink) |
| References | <20121208063016.AD08D6929@smc.vnet.net> |
| Organization | Time-Warner Telecom |
The vareiable name goes on the LHS of the Set and spelling
DateListPlot correctly helps as well.
dates = {"Mar-28-2008", "Apr-03-2009"};
DateListPlot[{1, 2}, dates]
Bob Hanlon
On Sat, Dec 8, 2012 at 1:30 AM, bigchap86 <ross.d.chapman@gmail.com> wrote:
> Hello all,
>
> Quick question re: date formatting:
>
> So I've imported a data set externally from Excel with the intent to try to plot a time series graph. Unfortunately, the dates have come in the following format:
>
> Mar-28-2008
>
> 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.
>
> Thanks!
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Date Formatting Bob Hanlon <hanlonr357@gmail.com> - 2012-12-09 15:58 +0000
csiph-web