How to display time on 16x2 LCD

Hi hcm2000.

Is you problem in creating a clock, or is it in displaying it ?
You told you know how to display texts.
If the problem is in displaying it, you need to find out how to display values instead of text, and the above code has some samples of that.
Also think about what variables you have in a time display (it's most like not just a single variable).

If you have some half working code, show it so people can help you improve it.