I have a RTC module similar to the one here: https://www.sparkfun.com/products/99

I just need to program the arduino to display the time and date on a LCD display.Have seen and tried out a few examples on the forum for the RTC module but I don't know why I am not able to get them working properly.

Often these modules need to be enabled to start keeping time. There is a bit that needs to be set to do this. If you go to the link in my signature below I have a library with example code that allows you to look at what is happening in the ds1307.

Are you sure your connections are correct?If you want others to help, though, you really need to be more clear about what errors you are getting.

char *dow2String(uint8_t code){ char *str[] = {" Sun", " Mon", " Tue", " Wed", " Thu", " Fri", " Sat"}; return(str[code-1]);}What is the pointer pointing to when the array goes out of scope. It points to some place on the heap where some other data now lives. In other words, garbage. So, you get garbage on the LCD. No real surprise there.

The day name string should be global. Then, there is no need for this function.