I have Day, Month, Year, Hour and Minute in different columns, how to combine in a datetime format (17-Oct-2019 00:00)?
10 次查看(过去 30 天)
显示 更早的评论
Please find the attached files
Thank you
0 个评论
回答(1 个)
Marcel Kreuzberg
2019-12-11
try
Second = zeros(53715,1);
Year = Year+2000;
t = datetime(Year,Month,Day,Hour,Minute,Second,'Format','dd-MMM-yyyy hh:mm');
regards
Marcel
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!