Page 1 of 1

string to date

Posted: Sat Aug 01, 2009 2:24 pm
by radiators
hi, php experts

if i haw two strings $a = "30.07.2009" and $b = "2009-07-30";

how can i convert thes strings to new strings for putting in mysql table?

Re: string to date

Posted: Sat Aug 01, 2009 4:52 pm
by califdon
radiators wrote:hi, php experts

if i haw two strings $a = "30.07.2009" and $b = "2009-07-30";

how can i convert thes strings to new strings for putting in mysql table?
That depends entirely on what data type you use for the column in your table.
Read this: http://www.bigroom.co.uk/blog/dates-in-php-and-mysql