简体   繁体   中英

how do i select the dates with a specific month?

How do I select the date with a specific month? For example I have in my table:

1-mar-2015
16-mar-2013
12-feb-2016
14-apr-2014

And I want to get only the dates from march. The result should be:

1-mar-2015
16-mar-2013

Databases have ways of extracting date parts. The ANSI standard method is:

where extract(month from date) = 3

Other databases support functions such as month() or to_char() to achieve the same purpose.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM