Timeformat from HH:MM:SS to HHMMSS

8 visualizaciones (últimos 30 días)
em_++
em_++ el 19 de Oct. de 2021
Comentada: Star Strider el 19 de Oct. de 2021
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 comentarios
KSSV
KSSV el 19 de Oct. de 2021
In what format you have? An example will help us to you.
em_++
em_++ el 19 de Oct. de 2021
Editada: em_++ el 19 de Oct. de 2021
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

Iniciar sesión para comentar.

Respuestas (1)

Star Strider
Star Strider el 19 de Oct. de 2021
Try this —
time = datetime('12:30:00', 'InputFormat','HH:mm:SS', 'Format','HHmmSS')
time = datetime
123000
.
  2 comentarios
em_++
em_++ el 19 de Oct. de 2021
thank you very much! this helped!
Star Strider
Star Strider el 19 de Oct. de 2021
My pleasure!
.

Iniciar sesión para comentar.

Categorías

Más información sobre Characters and Strings en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by