Jump to content

Help with CURDATE() NOT WORKING


paulman888888

Recommended Posts

hi;

I inserted my date into a normal text in the format of DD-MM-YY and i want to use the where in mysql.

Example;

SELECT * from table WHERE thedate > todays date

 

What i am trying to ask for is a different way of finding days that are before today in mysql.

 

Thankyou

Paul

Link to comment
https://forums.phpfreaks.com/topic/161667-help-with-curdate-not-working/
Share on other sites

SELECT * from table WHERE thedate > todays date will give You the dates that are larger then today's date.

Do you have that kind of record?

 

Maybe try: SELECT * from table WHERE thedate >= todays date;

 

And try printing out "thedate" to see if the format matches

Why not store it as the 'date' type so you can perform logical operations like this?

 

P.S. - thedate > today's date makes no sense.  If you want the dates that come before today's date, then it would be thedate < today's day.

Is there a way to convert data already in the table to this format?

 

Dathremar; It doesn't work but thankyou all the same.

 

Thankyou all

Paul

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.