Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove 0 at beginning of formatted time

I have an NSDate formatted with NSDateFormatter as "hh:mm:ss". Everything displays properly except when the hour is one digit (e.g. 3:00) it would display 03:00. How would I get rid of that 0 so it would display 3:00?

like image 702
DoctorLawyerAstronaut101 Avatar asked Nov 29 '22 12:11

DoctorLawyerAstronaut101


1 Answers

If you use 1 h instead of two you will not get the leading 0.

h:mm:ss

like image 75
Kara Avatar answered Dec 05 '22 13:12

Kara