How to convert a char into datetime variable?
조회 수: 7 (최근 30일)
이전 댓글 표시
Hello, how can I convert a char such as '11:04:55' to datetime variable?
Thank you very much.
댓글 수: 0
채택된 답변
Guillaume
2019년 3월 21일
datetime('11:04:55')
Note that it will use the current date for the date part (since a datetime is always date + time as the name indicates). If you do not want the date to display (it will still be stored and can be accessed):
datetime('11:04:55', 'Format', 'HH:mm:ss')
duation('11:04:55')
Just as easy.
추가 답변 (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!