Copy link to clipboard
Copied
Dear,
I am outputing date colum from mysql, and it is like this 2010-02-23 and I would like it to echo like (February 2010)
Or something esle that could help, is, a way to insert only a part of a date in myslq, I mean a way to allow a user to enter a usual date which could be Cdate or simply in putted and (ex. 2010-03-12), then have php convert it to 2010 March, before it get inserted.
Any help is welcome, and please don't refference me to w3school, or the mysql manuel, I have been there and got nothing, expect the DATE_FORMAT, but since I have rather a complicated query, I would like to format just the echoed individual colum.
Thanks
R.
Copy link to clipboard
Copied
I'm sorry that you don't want to learn the right way to do this... but DATE_FORMAT *is* what you need to do.
Copy link to clipboard
Copied
Yes, you're right, but the problem is, when I link to get the archive using URL parameter, this is what I get in my browser January 2010 (for example) but on the output page, I don't how to get the same format for the query to work, I am kind of stuck, and don't even know how to explain this, I can send you a copy of the code if that might help more.
R.
Copy link to clipboard
Copied
Got the query to work, using the contains argument, so I am giving your the credit anyway.
Copy link to clipboard
Copied
Have you tried just adjusting your sql query using date_format?
SELECT DATE_FORMAT(date_column_name, '%M %Y')
Copy link to clipboard
Copied
I tried that, didn't work, so now I used the same query, without changing anything, but instead of = to URL p. I use
d, contains and double my link, with one displaying January 2010 and the url sending 2010-01
so now, I can get the result I want while keeping my format,
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more