Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
select間のmysqlの日付について質問がありました。mysqlテーブルでは、フィールドはvarcharです。日付範囲は「21-01-2013」および「31-01-2013」で、レコードを表示できますが、日付範囲は「21-01-2013」および「20-02-2013」で、表示できません。レコード。
"SELECT * from away_from_office where (awaydatefrom between '21-01-2013' and '31-01-2013') ";
列のデータ型を次のように変更しますDATE
DATE
http://dev.mysql.com/doc/refman/5.1/en/datetime.html