Timeformat from HH:MM:SS to HHMMSS

2 vues (au cours des 30 derniers jours)
em_++
em_++ le 19 Oct 2021
Commenté : Star Strider le 19 Oct 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 commentaires
KSSV
KSSV le 19 Oct 2021
In what format you have? An example will help us to you.
em_++
em_++ le 19 Oct 2021
Modifié(e) : em_++ le 19 Oct 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

Connectez-vous pour commenter.

Réponses (1)

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

Connectez-vous pour commenter.

Catégories

En savoir plus sur Dates and Time dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by