As you told,First I got the value as mtime (last modified time for first file as)1151492749.From this value how can i get the string with yyyymmdd hhmm.I never found any example how to do that.I found example for converting localtime() or gmt.How i can convert this valur to that string format what i am having in my date string.Can you please tell me how to do that part of code.