[TYPO3-mvc] How to delete a date entry

Sebastian Schreiber me at schreibersebastian.de
Thu Mar 8 22:25:24 CET 2012


Am 08.03.2012 20:27, schrieb Ulrich Fischer:
>
> Hi,
>
> if a dateTime field is set
>
> $object->setMydate('0');
> or
> $object->setMydate('');
>
> the former value is deleted in the database, but an error is caused:
> "Argument 1 passed to 'mydate' must be an instance of DateTime, string 
> given"
>
> Is there an "error free way" to delete a DateTime entries?
>
> Thank you for any advice
>
> Ulrich
>
Hi Ulrich,
what about settings it to NULL => setMyDate(NULL) ?
Give it a try.



-- 
Sebastian Schreiber
(Medieninformatiker B.Sc.)
(TYPO3 Certified Integrator)

Schanzenstraße 27, Schlosserei 4
D-51063 Köln

T  0221 677 88 541
M  0176 431 05 790

Skype schreibersebastian.de

me at schreibersebastian.de
www.schreibersebastian.de

Steuernummer: 217 / 5269 / 4675



More information about the TYPO3-project-typo3v4mvc mailing list