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


Groups > comp.soft-sys.math.mathematica > #12704 > unrolled thread

Re: Date Formatting

Started byTomas Garza <tgarza10@msn.com>
First post2012-12-09 15:58 +0000
Last post2012-12-09 15:58 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Date Formatting Tomas Garza <tgarza10@msn.com> - 2012-12-09 15:58 +0000

#12704 — Re: Date Formatting

FromTomas Garza <tgarza10@msn.com>
Date2012-12-09 15:58 +0000
SubjectRe: Date Formatting
Message-ID<ka2cf4$7gf$1@smc.vnet.net>
First, you have to write DateListPlot instead of DataListPlot. Second, set dates = {"Mar-28-2008", "Apr-03-2009"} instead of {"Mar-28-2008","Apr-03-2009"} = dates. Then it works OK.
-Tomas

> From: ross.d.chapman@gmail.com
> Subject: Date Formatting
> To: mathgroup@smc.vnet.net
> Date: Sat, 8 Dec 2012 01:30:16 -0500
>
> 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!
>

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web