4 digits 7 segments clock

Hello there!

I want to make a clock, with 4 digits 7 segments display. I have the TimeAlarms library from the playground. I know how to use the display. My question is, how to make the display to show the digit "1" when it is 1 o'clock (for example)? Do i need to make another library where i list how to "write" every digit?

You can give better examples.
Is digit 1 on the right hand side?
Do you want this?

You can write chunks of code in functions then call those functions.


To get help, you must show us your complete sketch. Attach your code using the </> icon on the left side of the posting menu.

There is the code:

 * TimeAlarmExample.pde
 * This example calls alarm functions at 8:30 am and at 5:45 pm (17:45)
 * and simulates turning lights on at night and off in the morning
 * A weekly timer is set for Saturdays at 8:30:30
 * A timer is called every 15 seconds
 * Another timer is called once only after 10 seconds
 * At startup the time is set to Jan 1 2011  8:29 am
#include <Time.h>
#include <TimeAlarms.h>

void setup()
  setTime(8,29,0,1,1,11); // set time to Saturday 8:29:00am Jan 1 2011
  // create the alarms 

void  loop(){  
  Alarm.delay(1000); // wait one second between clock display

void digitalClockDisplay()
  // digital clock display of the time

void printDigits(int digits)
  if(digits < 10)

Ok i gave poor example, sorry.
What i ment is, if the time is 13:30, i want the display to shoy the same thing (13:30)

The time library has an AM PM function.
If it is PM, add 1200 to your time.

I thought the time in the library was already 24 hour format.
It has a 12 hour format function:
hourFormat12(); // The hour now in 12 hour format