public function formatTemporalValue($value, $type)
    {
        /** @var $dt PropelDateTime */
        if ($dt = PropelDateTime::newInstance($value)) {
            if ($type instanceof ColumnMap) {
                $type = $type->getType();
            }
            switch ($type) {
                case PropelColumnTypes::TIMESTAMP:
                case PropelColumnTypes::BU_TIMESTAMP:
                    $value = $dt->format($this->getTimestampFormatter());
                    break;
                case PropelColumnTypes::DATE:
                case PropelColumnTypes::BU_DATE:
                    $value = $dt->format($this->getDateFormatter());
                    break;
                case PropelColumnTypes::TIME:
                    $value = $dt->format($this->getTimeFormatter());
                    break;
            }
        }

        return $value;
    }
public function formatTemporalValue($value, $type)
    {
        /** @var $dt PropelDateTime */
        if ($dt = PropelDateTime::newInstance($value)) {
            if ($type instanceof ColumnMap) {
                $type = $type->getType();
            }
            switch ($type) {
                case PropelColumnTypes::TIMESTAMP:
                case PropelColumnTypes::BU_TIMESTAMP:
                    $value = $dt->format($this->getTimestampFormatter());
                    break;
                case PropelColumnTypes::DATE:
                case PropelColumnTypes::BU_DATE:
                    $value = $dt->format($this->getDateFormatter());
                    break;
                case PropelColumnTypes::TIME:
                    $value = $dt->format($this->getTimeFormatter());
                    break;
            }
        }

        return $value;
    }
public function formatTemporalValue ( $ value , $ type ) { /** @var $dt PropelDateTime */ if ( $ dt = PropelDateTime :: newInstance ( $ value ) ) { if ( $ type instanceof ColumnMap ) { $ type = $ type -> getType ( ) ; } switch ( $ type ) { case PropelColumnTypes :: TIMESTAMP : case PropelColumnTypes :: BU_TIMESTAMP : $ value = $ dt -> format ( $ this -> getTimestampFormatter ( ) ) ; break ; case PropelColumnTypes :: DATE : case PropelColumnTypes :: BU_DATE : $ value = $ dt -> format ( $ this -> getDateFormatter ( ) ) ; break ; case PropelColumnTypes :: TIME : $ value = $ dt -> format ( $ this -> getTimeFormatter ( ) ) ; break ; } } return $ value ; }
Formats a temporal value before binding, given a ColumnMap object.

@param mixed $value The temporal value
@param mixed $type  PropelColumnTypes constant, or ColumnMap object

@return string The formatted temporal value
Formats a temporal value before binding given a ColumnMap object .