Processing time data from Azure Table in R and Matlab can be quite tricky. First DateTime gets converted to UTC when inserted into Azure Tables [msdn]. Then Powershell’s Export-CSV takes those dates and format them using the current locale (say “11/26/2014 5:31:16 AM” in North America). This is not what R and Matlab expect and conversions are needed to use those dates.
R needs to be given the default .NET date format to parse the date string:
The date can then be converted from UTC to local time:
Date parsing is similar in Matlab, using datenum():
The problem with Matlab is that until R2014a it did not support the notion of time zones [mathworks]. For older versions, Matlab’s interop with Java gives access to the TimeZone class which provides the offset between UTC and local time:
This MSDN article has an enlightening list of common gotchas around processing dates.