This Field Type represents a full date including time information.
Name
Internal name
Expected input type
DateAndTime
ezdatetime
mixed
Description
This Field Type makes possible to store and retrieve a full date including time information.
Input expectations
If input value is of type string or integer, it will be passed directly to the PHP's built-in \DateTime class constructor, therefore the same input format expectations apply.
It is also possible to directly pass an instance of \DateTime.
Type
Example
string
"2012-08-28 12:20 Europe/Berlin"
integer
1346149200
\DateTime
new \DateTime()
Value object
Properties
The Value class of this field type contains the following properties:
Property
Type
Description
$value
\DateTime
The date and time value as an instance of \DateTime.
Constructor
The constructor for this value object will initialize a new Value object with the value provided. It accepts an instance of PHP's built-in \DateTime class.
String representation
String representation of the date value will generate the date string in the format "D Y-d-m H:i:s" as accepted by PHP's built-in date() function.
Example:
Wed 2013-22-05 12:19:18
Hash format
Hash value of this Field Type is an array with two keys: