hi, how can i convert this date Thu, Sep-24-15 to a serial date number.
thanks

 採用された回答

Star Strider
Star Strider 2015 年 9 月 26 日

0 投票

This should work:
date_num = cellfun(@(x)datenum(x, 'ddd, mmm-DD-YY'), check123);

2 件のコメント

AA
AA 2015 年 9 月 26 日
cellfun(@(x)datenum(x, 'ddd, mmm-DD-YY'), check123(~cellfun('isempty',check123)));
with empty lines u can use the above, thanks bro
Star Strider
Star Strider 2015 年 9 月 26 日
My pleasure.

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

その他の回答 (2 件)

Walter Roberson
Walter Roberson 2015 年 9 月 25 日

0 投票

datenum('Thu, Sep-24-15', 'ddd, mmm-DD-YY')
AA
AA 2015 年 9 月 26 日

0 投票

i used this code
>> date_num = cellfun(@datenum, check123, 'ddd, mmm-DD-YY');
check 123 is a cell array with one column of the dates in the format 'ddd, mmm-DD-YY'. I get the error message Input #3 expected to be a cell array, was char instead.
how can i correct this error?

カテゴリ

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

質問済み:

AA
2015 年 9 月 25 日

コメント済み:

2015 年 9 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by