Hi,
Im getting date and time of creation of a file with : A = dir(myfile); disp(A.date)
and I end up with
07-lip-2014 03:35:30
while all I want is :
07-07-07.
So no time and month name, 'lipiec' or 'July' as 07 - how do I do that ??
Kind regards Damian

 채택된 답변

Star Strider
Star Strider 2014년 7월 21일

1 개 추천

Use the .datenum option:
ds = datestr(A.datenum, 'dd-mm-yy');
So if the date of ‘A’ is today (21-lip-2014), it would return 21-07-14. See the documentation for datestr for other options.

추가 답변 (1개)

Damian
Damian 2014년 7월 21일

0 개 추천

thank you so much !

카테고리

도움말 센터File Exchange에서 Dates and Time에 대해 자세히 알아보기

태그

질문:

2014년 7월 21일

댓글:

2014년 7월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by