# Plotting CSV files with UTC Universal Time

So I have many CSV files in format like this:

2014-12-11T16:13:13.038337Z , 3.90092

2014-12-11T16:14:13.456558Z , 3.89734

2014-12-11T16:15:12.444318Z , 3.90092

I imported a CSV file with data = Import["file.csv","CSV"]

What should I do to get Mathematica to plot the date/time against the y-value? Do I need to convert the time format first? If so, how do I go about doing that?

Supposing you import the file so that it produces the following structure..

data = {
{"2014-12-11T16:13:13.038337Z", 3.90092},
{"2014-12-11T16:14:13.456558Z", 3.89734},
{"2014-12-11T16:15:12.444318Z", 3.90092}}


You would then be best off converting it to a TimeSeries object which is fairly clever about parsing dates automatically.

ts = TimeSeries[data]
DateListPlot[ts]


If for some reason the dates don't get handled the way you expect you will need to convert them with DateString and specify the particular date-time format prior to feeding into TimeSeries.