src/Venturecraft/Revisionable/FieldFormatter.php
public static function datetime($value, $format = 'Y-m-d H:i:s')
    {
        if (empty($value)) {
            return null;    
        }
        
        $datetime = new \DateTime($value);

        return $datetime->format($format);
    }
public static function datetime($value, $format = 'Y-m-d H:i:s')
    {
        if (empty($value)) {
            return null;    
        }
        
        $datetime = new \DateTime($value);

        return $datetime->format($format);
    }
public static function datetime ( $ value , $ format = 'Y-m-d H:i:s' ) { if ( empty ( $ value ) ) { return null ; } $ datetime = new \ DateTime ( $ value ) ; return $ datetime -> format ( $ format ) ; }
Format the datetime

@param string $value
@param string $format

@return formatted datetime
Format the datetime