can somebody tell me how to add AM/PM option in this Sketch

How about adding something in this part

  else {
    message[0] = ' ';
    message[1] = ' ';
    message[2] = char(lh) + 48;
    message[3] = char(rh) + 48;
    message[4] = ':';
    message[5] = char(lm) + 48;
    message[6] = char(rm) + 48;
    message[7] = '\0';
    printText(0, MAX_DEVICES - 1, message);
  }

Test if hour is smaller than 12 and add PM, else add AM.

You will have to move everything up two positions (message[2] to message[0], message[3] to message[1] etc) as you only have space for 9 characters. message[5] becomes a space, message[5] 'A' or 'P' and message[7] an 'M' and message[8] the nul terminator.

You can move it one position if you want.