Convert Serial numbers to conventional date

조회 수: 6 (최근 30일)
ASONG ZILEFAC
ASONG ZILEFAC 2012년 11월 4일
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
  댓글 수: 2
ASONG ZILEFAC
ASONG ZILEFAC 2012년 11월 5일
Hi Per,
It works well for this case. What if I have a column vector?
Thank so much.
Walter Roberson
Walter Roberson 2012년 11월 5일
Try it and see.

댓글을 달려면 로그인하십시오.

카테고리

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