-4

Please help to convert from "MM:SS.MS" to "SS.MS" in PHP?

Thanks!

KimAl
  • 1
  • 1

1 Answers1

0

You can use:

(new DateTime())->createFromFormat('G:s.u', '15:35.123')->format('s.u');

or just

explode(':', '15:23.123')[1];
vuryss
  • 1,270
  • 8
  • 16
  • Although you have a good intention by answering this off-topic question, be aware that it just encourages people to ask more such question because they get what they want. – B001ᛦ Jun 19 '18 at 09:14