From: 7stud -- Date: 2008-05-07T17:27:27+09:00 Subject: Re: Date Parsing Clement Ow wrote: > Clement Ow wrote: >> >>> puts "I don't want to delete this file" >>> end >> >> Hi, thanks for that, did'nt know you can do it this way ;) >> However, I have 2 formats, one yyyymmdd and the other just ddmmyyyy(w/o >> any dashes). Unfortunately Parsedate cannot be used for ddmmyyyy. Only >> yyyymmdd can work. Any ideas? > > or is there any way that we can convert something like ddmmyyyy to > yyyymmdd so that it'll work when we use Date or parsedate to parse dates > in order to not raise an invalid date error? Any string can be parsed using one of the examples I posted. -- Posted via http://www.ruby-forum.com/.