Re[2]: [PHP] Strange problem... From: faeton (faeton <email protected>)
Date: 11/30/01

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 <email protected> www.xemichat.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>