Can someone tell me how to get the current date and time in the follwoing format, using Time::Local?
MM/DD/YYYY HH:MI:SS AM/PM
Can someone tell me how to get the current date and time in the follwoing format, using Time::Local?
MM/DD/YYYY HH:MI:SS AM/PM
If this is Perl, why need Time::Local? Time::Local is for getting a Unix timestamp from given time fields that can be used for further processing. It won't give you the date formatting.
A primitive, clumsy way but certainly works:
Or install Time::Format. It has a flexible way of formatting date and time.