Print `date +%m`; Prints '01' for january, '02' for February etc You can format all kinds of time with this.
Unix> man date Dan -----Original Message----- From: John Dunn [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 8:58 AM To: [EMAIL PROTECTED] Subject: return date/time in required format I need to return the current date and time in the following format YYYYMMDDHHMMSS but am struggling to do this using the localtime function In perticular, how do I get the month number(e.g. 09 for Sep)? John Dunn Sefas Innovation Ltd 0117 9154267 www.sefas.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]