Hi, Im using the RTC widget to display the time on Labeled Value widgets on my project. The widgets work well, time is displayed correctly, however . . . when any of H, M or S are single digits, only the single digit is displayed:
eg 8:48:8 or 21:3:56
Is it possible to display the leading zero in the Labeled Display widget for the single digits?
eg. 08:48:08 or 21:03:56
I’ve found answers for formatiing for Serial Print (RTC code to show value on widget), and I’ve tried expanding similar formatting that works for floats in the Labeled Value widget (eg /pin.##/) - I tried /pin.##.##.##/ but this didnt work.
Great, thnx for the quick response! I’m not familiar with sprintf(), with the brief reding I’ve done I ASSUMED (first mistake . . .) that it was formatting for serial print only. Will try this out as soon as I get home later today,
Well, probably not it’s official name, but I call it serialprintformat() and once the data is formatted, it can be used for a serial print or equivalent, in our case a display widget