public function toDate($date, $dateFormat)
    {
        $dateTime = DateTime::createFromFormat($dateFormat, $date);

        return $dateTime->format(self::YMDH);
    }
public function toDate($date, $dateFormat)
    {
        $dateTime = DateTime::createFromFormat($dateFormat, $date);

        return $dateTime->format(self::YMDH);
    }
public function toDate ( $ date , $ dateFormat ) { $ dateTime = DateTime :: createFromFormat ( $ dateFormat , $ date ) ; return $ dateTime -> format ( self :: YMDH ) ; }
Format a string date to a string database readable format.

@param string $date
@param string $dateFormat
@return string
Format a string date to a string database readable format .