Convert string into date
3 次查看(过去 30 天)
显示 更早的评论
I am trying to convert "145601" into "14:56:01". How can I do this in a for loop?
0 个评论
采纳的回答
Star Strider
2023-8-30
str = "145601"
DT = datetime(str, 'InputFormat',"HHmmss", 'Format','HH:mm:ss')
.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!