use Date::Manip; $datestr = "1/26/2005 9:58:31 AM"; $year = UnixDate($datestr, "%Y");