>>Why not "%04d%02d%02d" % [d.year, d.month, d.day] ? Probably because I'm not super-comfortable with all of Ruby's many, many, many features.
>>Chris has already given a near solution. You just need to "select: #isDigit" on the end of his answer to get exactly what you want.<< I figured there was a good way to use "select:" but couldn't think of it, thanks. Date today yyyymmdd select: #isDigit is not bad, though I'd think you should be able to set the separator somehow (or remove it, as in my case).