It can also be done in one line, although that does not necessarily improve the readability ;-) printf "%04d%02d%02d", sub{$_[0]+1900,$_[1]+1,$_[2]}->((localtime)[5,4,3]);
-- Hofmator
In reply to Re: date +%Y%m%d
by Hofmator
in thread Formatting date strings (was: date +%Y%m%d)
by c
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |