Convert Serial numbers to conventional date

5 次查看(过去 30 天)
Hi,
I would like to convert these serial number 17067072 to conventional date such as mm-dd-yyyy.
I have a column vector of such dates to convert. I downloaded data in netCDF format, converted to ASCII and now have to convert the dates for easy interpretation.
I could convert using 'datestr' but my dates have 8 values as above.
I appreciate your effort.
Thanks.
  1 个评论
ASONG ZILEFAC
ASONG ZILEFAC 2012-11-4
The data I downloaded is on a daily basis and spans between 1948 to 2011 on a daily timescale.

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2012-11-4
datestr() can handle column vectors of serial date numbers.

更多回答(1 个)

per isakson
per isakson 2012-11-4
编辑:per isakson 2012-11-5
NetCDF files are supposed to be self-documented. Is it "serial hour numbers"?
>> datestr( 17067072, 31 )
ans =
6728-01-21 00:00:00
>> datestr( 17067072/24, 31 )
ans =
1947-01-01 00:00:00

类别

Help CenterFile Exchange 中查找有关 Dates and Time 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by