Can't manage to sort a file and display time & date on a LCD screen.

   while(myFile.available())
    {
        while(character != '\n')
               {
                 character = myFile.read();

What happens if there isn't a \n in the file?

                 tab[x][y]=character;

What happens if the record is more than 23 characters long?
What happens if there are more than 24 records in the file?

Error handling IS important.

  if (Vprdt==HIGH)
    {
      buttonCount=1;
    }

Nonsense. You aren't counting anything.

Add some Serial.print() statements to see where the code is not doing what you want.

How is the SD card connected to the Arduino? Typically, SD cards are accessed using SPI, which means pins 11, 12, and 13. You are using pin 4 as the chip select pin AND as a switch pin. Hardly a good idea.