Timeformat from HH:MM:SS to HHMMSS

조회 수: 8 (최근 30일)
em_++
em_++ 2021년 10월 19일
댓글: Star Strider 2021년 10월 19일
Hi!
i want to convert my current time format (-> HH:MM:SS) to HHMMSS.
Is there a easy way to do that?
Thanks in advance!
  댓글 수: 2
KSSV
KSSV 2021년 10월 19일
In what format you have? An example will help us to you.
em_++
em_++ 2021년 10월 19일
편집: em_++ 2021년 10월 19일
my current format is HH:MM:SS (hour hour: minute minute: seconde second) and i want (hour hour minute minute seconde second).
example :
12:30:00
to
123000

댓글을 달려면 로그인하십시오.

답변 (1개)

Star Strider
Star Strider 2021년 10월 19일
Try this —
time = datetime('12:30:00', 'InputFormat','HH:mm:SS', 'Format','HHmmSS')
time = datetime
123000
.
  댓글 수: 2
em_++
em_++ 2021년 10월 19일
thank you very much! this helped!
Star Strider
Star Strider 2021년 10월 19일
My pleasure!
.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by