Actually, your post does not contain enough information about what you want, for anyone to provide anything more than a guess.
Quote:
how about.. like ..
Sunday April 29th 2006
is that possible?
|
Is it possible to do what with this? Convert a string entered like your's into a mysql format date? Yes - see the STR_TO_DATE function at the link alane provided in the post above.
This part of the query would look something like this -
STR_TO_DATE('Sunday April 29th 2006', '%W %M %D %Y')
You can put this conversion any place in the query where you want a mysql format date out of your date string.
If you have dates stored in the database in mysql format in a field called date_col and your date is in a variable called $datestring, the following
should work(I have not personally used this) in a query to find all the rows where the date is less then your date -
WHERE date_col < STR_TO_DATE('$datestring', '%W %M %D %Y')
Is is possible to take a mysql format date and output it in your format? Yes - see the DATE_FORMAT function at the link alane provided.
This part of the query in a SELECT would look something like this (assuming that the dates are in a field called date_col) -
DATE_FORMAT(date_col, '%W %M %D %Y') AS date