1 拿到日期中的月份
to_char([該日期字段],'mm')
2 將月份轉為number型
to_number(to_char([該日期字段],'mm'))
eg:例子:
查詢4月的數據
select * from 表名where to_number(to_char([該日期字段],'mm'))
其實超簡單的 對吧!
1 拿到日期中的月份
to_char([該日期字段],'mm')
2 將月份轉為number型
to_number(to_char([該日期字段],'mm'))
eg:例子:
查詢4月的數據
select * from 表名where to_number(to_char([該日期字段],'mm'))
其實超簡單的 對吧!
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。