<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/253522</link>
    <title>MATLAB Central Newsreader - Date and time handling question...</title>
    <description>Feed for thread: Date and time handling question...</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Fri, 12 Jun 2009 09:38:02 -0400</pubDate>
      <title>Date and time handling question...</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/253522#656675</link>
      <author>Andrey Kazak</author>
      <description>Greetings!&lt;br&gt;
&lt;br&gt;
I have a csv file as follows:&lt;br&gt;
===&lt;br&gt;
Date and Time, Value,&lt;br&gt;
08.06.2009 16:16:26, 3&lt;br&gt;
...&lt;br&gt;
===&lt;br&gt;
Could you advice me please on how to import such time series in matlab for further processing, such as time interpolation please?&lt;br&gt;
&lt;br&gt;
Prompt and clear reply would be very much appreciated...</description>
    </item>
    <item>
      <pubDate>Fri, 12 Jun 2009 09:55:02 -0400</pubDate>
      <title>Re: Date and time handling question...</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/253522#656678</link>
      <author>Pekka Kumpulainen</author>
      <description>&quot;Andrey Kazak&quot; &amp;lt;AK@nospam.ru&amp;gt; wrote in message &amp;lt;h0t7lq$t1i$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Greetings!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have a csv file as follows:&lt;br&gt;
&amp;gt; ===&lt;br&gt;
&amp;gt; Date and Time, Value,&lt;br&gt;
&amp;gt; 08.06.2009 16:16:26, 3&lt;br&gt;
&amp;gt; ...&lt;br&gt;
&amp;gt; ===&lt;br&gt;
&amp;gt; Could you advice me please on how to import such time series in matlab for further processing, such as time interpolation please?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Prompt and clear reply would be very much appreciated...&lt;br&gt;
&lt;br&gt;
doc textscan&lt;br&gt;
doc datenum&lt;br&gt;
&lt;br&gt;
This for example seems to work:&lt;br&gt;
fid = fopen('myfile.csv');&lt;br&gt;
g = textscan(fid,'%s%f','headerlines',1,'delimiter',',');&lt;br&gt;
fclose(fid);&lt;br&gt;
time = datenum(g{1});</description>
    </item>
    <item>
      <pubDate>Fri, 12 Jun 2009 10:23:01 -0400</pubDate>
      <title>Re: Date and time handling question...</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/253522#656684</link>
      <author>Pekka Kumpulainen</author>
      <description>&quot;Pekka Kumpulainen&quot; &amp;lt;pekka.nospam.kumpulainen@tut.please.fi&amp;gt; wrote in message &amp;lt;h0t8lm$2dg$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Andrey Kazak&quot; &amp;lt;AK@nospam.ru&amp;gt; wrote in message &amp;lt;h0t7lq$t1i$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Greetings!&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I have a csv file as follows:&lt;br&gt;
&amp;gt; &amp;gt; ===&lt;br&gt;
&amp;gt; &amp;gt; Date and Time, Value,&lt;br&gt;
&amp;gt; &amp;gt; 08.06.2009 16:16:26, 3&lt;br&gt;
&amp;gt; &amp;gt; ...&lt;br&gt;
&amp;gt; &amp;gt; ===&lt;br&gt;
&amp;gt; &amp;gt; Could you advice me please on how to import such time series in matlab for further processing, such as time interpolation please?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Prompt and clear reply would be very much appreciated...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; doc textscan&lt;br&gt;
&amp;gt; doc datenum&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; This for example seems to work:&lt;br&gt;
&amp;gt; fid = fopen('myfile.csv');&lt;br&gt;
&amp;gt; g = textscan(fid,'%s%f','headerlines',1,'delimiter',',');&lt;br&gt;
&amp;gt; fclose(fid);&lt;br&gt;
&amp;gt; time = datenum(g{1});&lt;br&gt;
&lt;br&gt;
Oops, wasn't carefun enough with the date format, this should do it&lt;br&gt;
time = datenum(g{1},'dd.mm.yyyy HH:MM:SS');&lt;br&gt;
or if you use month.day.year, swap the dd and mm in the format string&lt;br&gt;
hth</description>
    </item>
    <item>
      <pubDate>Sat, 13 Jun 2009 04:40:17 -0400</pubDate>
      <title>Re: Date and time handling question...</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/253522#656959</link>
      <author>Andrey Kazak</author>
      <description>Thank you, Pekka!&lt;br&gt;
&lt;br&gt;
This works very nice...</description>
    </item>
  </channel>
</rss>

