I've been pulling my hair out last night trying to do a very simple thing, but just can't seem to get it to display the info correctly.

I have two variables, one called starthours, the other startmin. The hours start at 0 and can be incremented to 23 by the press of a button, as can the minutes be inremented from 0 to 59.

I want to display the value of these two varibles as 00:00 on an LCD display. However because the vaule of each variable is single digit when less than 10 and is right justified I end up getting 9:7 on the display.

The following works fine for the Hours
Code:
If hours>=10 then LCDOut $FE,$D4,$10,dec starthour,":",dec startmin 
If hours<10 then LCDOut $FE,$D4+1,"0",dec starthour,":",dec startmin
But trying to get the minutes to display correctly using similar code has been a pain in the A**
Code:
If minutes>=10 then LCDOut $FE,$D4+3,$10,dec startmin 
If minutes<10 then LCDOut $FE,$D4+4,"0",dec startmin
Can someone please suggest the best way to display starthours:startmin in a 00:00 format, ie 09:03, 08:06, 13:34 etc