I would convert this string '10:12:25 Tue 11-Dec-18' into a date with this format: 11/12/2018 10:12 AM.
I tried to use the function datetime, but it does not recognize the string as a date, because of the day name Tue.

 採用された回答

Stephan
Stephan 2019 年 3 月 22 日
編集済み: Stephan 2019 年 3 月 22 日

3 投票

Date = '10:12:25 Tue 11-Dec-18'
res = datetime(Date ,'InputFormat','HH:mm:ss eee dd-MMM-yy','Format','dd/MM/yyyy HH:mm a')
Date =
'10:12:25 Tue 11-Dec-18'
res =
datetime
11/12/2018 10:12 AM

その他の回答 (0 件)

カテゴリ

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

質問済み:

2019 年 3 月 22 日

編集済み:

2019 年 3 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by