Timeformat from HH:MM:SS to HHMMSS

9 visualizzazioni (ultimi 30 giorni)
em_++
em_++ il 19 Ott 2021
Commentato: Star Strider il 19 Ott 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 Commenti
KSSV
KSSV il 19 Ott 2021
In what format you have? An example will help us to you.
em_++
em_++ il 19 Ott 2021
Modificato: em_++ il 19 Ott 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

Accedi per commentare.

Risposte (1)

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

Accedi per commentare.

Categorie

Scopri di più su Characters and Strings in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by