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.
日時フィールドの日付が「14」であるすべての結果を返すクエリを実行したいと考えています。どうすればこれを行うことができますか? 私はMySQLを使用しています。
ありがとう。
DAYOFMONTHと呼ばれる組み込み関数があります。
SELECT * FROM tableName WHERE DAYOFMONTH(dateColumn) = 14
ソース
mysql でEXTRACT ()関数を使用して、特定の日付からその日を抽出できます
select * from your_table where EXTRACT(DAY FROM Date_col)=14