All page names need to be in English.
en da  de  fr  it  ja  km  nl  ru  zh


From TYPO3Wiki
Jump to: navigation, search
This page belongs to the Flow Team (category Flow)

notice - Note

Login and contribute! If you encountered this exception, please help others
by providing information about how you got
this error. Especially if you have a solution,
please add it to this page!
Package: Flow
Subpackage: Property
Class: F3\FLOW3\Property\TypeConverter\DateTimeConverter
Method: convertFrom() {
Author: Bastian Waidelich <>
Message: The string "..." could not be converted to DateTime with format "..."
Description: A string could not be converted to a \DateTime object. The default format for converting strings to dates is the W3C format (Y-m-d\TH:i:sP) , e.g. "2011-06-24T19:04:23+02:00"
Possible solutions:  If this happens in the MVC stack context and the string to be converted is coming from a fluid template, you can pass an additional hidden field "dateFormat" with the dateformat to be used for the conversion like this:
 <input type="text" name="event[date][date]" id="date" value="{ ->'d.m.Y')}"/>
 <f:form.hidden name="event[date][dateFormat]" value="d.m.Y" />

instead of

 <f:form.textbox id="date" property="date />

Another possibility is to set the format in an initialize*Action from your controller, e.g.:

 public function initializeUpdateAction() {
   ->setTypeConverterOption('F3\FLOW3\Property\TypeConverter\DateTimeConverter', \F3\FLOW3\Property\TypeConverter\DateTimeConverter::CONFIGURATION_DATE_FORMAT, 'd.m.Y');

User contributed notes:
Your comment could have

  • Screenshot
  • Link to another Exception or a wiki-page
  • link to a bugtracker-entry, to the API/ PHP-code