Change date format in vector
1 回表示 (過去 30 日間)
古いコメントを表示
Hello i would like to uniform 2 different date format in a single vector:
4/1/2019 12:45:00 AM and 15/6/19 18:10
how can i do that?
2 件のコメント
Walter Roberson
2020 年 8 月 20 日
What is the data type being used? A vector of datetime only has one format associated with it.
採用された回答
Binbin Qi
2020 年 8 月 20 日
t1 = datetime("4/1/2019 12:45:00 AM",'InputFormat',"dd/MM/yyyy HH:mm:ss a");
t2 = datetime("15/6/19 18:10",'InputFormat',"dd/MM/yy HH:mm");
t = [t1, t2]
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Dates and Time についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!