On my machine, using Matlab R2014a, datevec(datenum(x)) produces result different from x:
>> datevec(datenum([2007, 4, 1, 30, 0, 0]))
ans =
2007 4 2 6 0 0
Is this a bug, or am I doing something wrong?

 採用された回答

Mischa Kim
Mischa Kim 2015 年 6 月 2 日

2 投票

Faber, looks good to me. 30h = 24h + 6h, in other words, the date corresponds to April 2, 6:00 AM.

1 件のコメント

Image Analyst
Image Analyst 2015 年 6 月 5 日

faber's "Answer" moved here:

Great, thanks!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDates and Time についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by