PDA

View Full Version : Display time in 12hr format using QLcdNumber



sattu
2nd May 2013, 07:48
Hi Everyone,

Currently I am using QLcdNumber class to display time in 24hrs format. It works really great. But when I want to display time in 12hrs format I am facing issue because QLcdNumber is not able to display 'M' letter. For ex-


Time in 24 hrs format- 15:05
Time in 12 hrs format- 03:05 PM

For 12 hrs format the letters AM and PM should also be displayed but QLcdNumber is not able to display the letter 'M'. I would be really glad if someone would help me out with it.

-sattu

Lesiok
2nd May 2013, 08:04
From QLCDNumber doc : These digits and other symbols can be shown: 0/O, 1, 2, 3, 4, 5/S, 6, 7, 8, 9/g, minus, decimal point, A, B, C, D, E, F, h, H, L, o, P, r, u, U, Y, colon, degree sign (which is specified as single quote in the string) and space. QLCDNumber substitutes spaces for illegal characters.. Did You see M letter in legal characters ?

sattu
2nd May 2013, 08:16
From QLCDNumber doc : These digits and other symbols can be shown: 0/O, 1, 2, 3, 4, 5/S, 6, 7, 8, 9/g, minus, decimal point, A, B, C, D, E, F, h, H, L, o, P, r, u, U, Y, colon, degree sign (which is specified as single quote in the string) and space. QLCDNumber substitutes spaces for illegal characters.. Did You see M letter in legal characters ?
That means it's not possible to display time in 12hrs format using QLcdNumber, right? Then I guess instead of a Digital Clock i will have to try using some normal Label for displaying the time in digital format.