MySQL Forums
Forum List  »  General

Date Strings in database
Posted by: Robert Sossomon
Date: November 15, 2004 10:09AM

I have a small dilemma.

I want to allow people to add information to a calendaring web page. Everything was working fine with the way I did have it (text field containing the date in format %m-%d-%y) until I tried to search and get all dates greater then today's date. It returned everything up through the end of the year.

I converted my table to hold a Date spot, but when I am displaying the information back out, I would like MySQL to do the date conversion back to %M %d, %Y. Any ideas how I would do this?

my current piece of code:
select * from table where DATE_FORMAT(Date,'%m-%d-%y') > 11-15 -04

but it shows me in MySQL all rows of information.

Thanks,
Robert

Options: ReplyQuote


Subject
Written By
Posted
Date Strings in database
November 15, 2004 10:09AM
November 16, 2004 12:55AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.