Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hey everybody, I wanted some help on these few lins of code. @f=(localtime)[3..5]; # grabs day/month/year values $SystemDate= sprintf "%d%02d%02d", $f[2] +1900, $f[1] +1, $f[0]; Right now $SystemDate has the value of yyyymmdd, so for eg it will pri +nt out today's date like below 20031217 I need it to print out the date as well as the timestamp so for eg it +should print out below 20031217150506 so that will be today's date plus the time 15:05:06 (but without the c +olons) can someone help me modify the code pasted below so that it prints out + what I want, Thanks for the input
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Date Extraction
by davido (Cardinal) on Dec 17, 2003 at 22:42 UTC | |
|
Re: Date Extraction
by CombatSquirrel (Hermit) on Dec 17, 2003 at 22:43 UTC | |
by Aragorn (Curate) on Dec 18, 2003 at 07:35 UTC | |
by ysth (Canon) on Dec 18, 2003 at 08:16 UTC | |
|
Re: Date Extraction
by Zaxo (Archbishop) on Dec 17, 2003 at 22:48 UTC | |
|
Re: Date Extraction
by Anonymous Monk on Dec 17, 2003 at 22:41 UTC |