Jump to content

Archived

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

mei_913

data with type "DATE"~~ QUESTION ABOUT comparing date!!

Recommended Posts

HI everyone! I have a problem with finding date within a range.
In my database, there's a table with a field "updatedate", which is of date type.
I want to find out the record with an "updatedate" within a range (typed by user), but i do not know the syntax for comparing date (YYYY-MM-DD). I've tried ">=" and "<=" but in vain.
Can anyone help me?? Thanks a lot!!!

Share this post


Link to post
Share on other sites
It's no different that comparing to string literals... but personally, I prefer using BETWEEN() because it's much more obvious what you're doing.

Share this post


Link to post
Share on other sites

×

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.