Two solutions
(a) The date class has the strptime method
d = Date.strptime("090403", "%d%m%y")
This gives you the standard Date class.
(b) The standard library has a parsedate method
require 'parsedate' pd = ParseDate.parsedate("090403") Time.local(pd)
It gives you a time class.
Option (a) you probably want
source share