Re[2]: [PHP] Strange problem...
| From: | faeton | Date: | Fri, 30 Nov 2001 23:54:08 +0000 |
| Subject: | Re[2]: [PHP] Strange problem... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76279@lists.php.net to get a copy of this message | ||
Hello Daniel,
$date = $birth_year."-".$birth_month."-".$birth_day;
And you can try inserting such kind o' date to a DATETIME field.
There's an alternative way:
$time = mktime(0,0,0, $birth_month, $birth_day, $birth_year);
That would return a unix timestamp that can be written to a BIGINT
field and in future returned by using date("m.d.Y", $time) from your
sql query.
He.
DA> Thanks Jim.
DA> but how would i actually do that? I have studied the date() function in the
DA> manual - but can´t find a way of inserting a set value from user input as a
DA> valid date.
DA> - D
------------------------------------------------
Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) faeton@xemichat.com www.xemichat.com