in reply to Picking up files based on datestamp

Dear Monks

Please help me a little more with the dates.

Using the localtime(time) option, currently I am getting the month as a sigle digit i.e. September as 9.

But how do I get the month as 09?

($day, $month, $year) = (localtime(time() - 86400))[3, 4, 5]; $month += 1; $year += 1900;


Thanks & regards,

Subhankar

Replies are listed 'Best First'.
Re^2: Picking up files based on datestamp
by siva kumar (Pilgrim) on Sep 21, 2007 at 09:52 UTC
      Thanks Siva!!

      I had already figured that out :-) I thought there could be a way within localtime(time) itself.

      Thanks & regards, Subhankar