Convert string into date
    4 views (last 30 days)
  
       Show older comments
    
I am trying to convert "145601" into "14:56:01". How can I do this in a for loop?
0 Comments
Accepted Answer
  Star Strider
      
      
 on 30 Aug 2023
        str = "145601"
DT = datetime(str, 'InputFormat',"HHmmss", 'Format','HH:mm:ss')
.
2 Comments
More Answers (0)
See Also
Categories
				Find more on Dates and Time in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
