1金币
本帖最后由 sonlia 于 2019-12-13 12:36 编辑
视图中 怎么筛选 当年 上个月的 数据 也就是是说 今天是 2019-12-13 我要获取 2019-1-1 到 2019-11-30 的数据 select count(id) from flash出库_子表 where strftime("%Y-%m-%d",FGC_CreateDate + julianday('1899-12-30') )<date('now','start of month','-1 day') and strftime("%Y-%m-%d",FGC_CreateDate + julianday('1899-12-30') )> date('now','start of year');
大体是这样子,:
正常的,date(now) 应该是 格林尼治 到现在的天数 ,odata 默认的是 1899-12-30 到现在的天数,嗯 加上这段天数 就能获得正确的日期了,
。。。怎么这么多乱七八糟的 事情 就没有统一么。哎
|
|