note 34069 added to function.settype
| From: | zakdrizzt at hotmail dot com | Date: | Tue, 15 Jul 2003 14:07:15 +0000 |
| Subject: | note 34069 added to function.settype | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-52135@lists.php.net to get a copy of this message | ||
How can we "cast" a date.
$d = "2003-06-09";// I get this value from a textfield
$date = (date) $d; or settype($d, date);
this two exemple don't work. how can I do?
because if I send a query with $d it doesn't work cause it doesn't consider this like a
date.
----
Manual Page -- http://www.php.net/manual/en/function.settype.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34069
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34069&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34069&report=yes