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 Exchange에서 Dates 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