FB日期时间操作
查询2007年度以后的,12月份以上的数据记录,datetime为timestamp字段 select * from tableblob where extract(month from datetime)=12 and extract(year from datetime)>2007 查询不重复的(年份+月份)组合,datetime为timestamp字段 select distinct (extract(year from datetime)||extract(month from datetime)) from tableblob 获取当前年(其它如year,month,day,hour,minute,second,week,weekday等,都可以获取): select extract(year from current_timestamp) from rdb$database select extract(week from current_timestamp) from rdb$database | ||
日期时间操作
select extract(year from cast('2008-1-1' as date)) |