.如果真 (组合框2.现行选中项 = 0) ' 指定时间范围 局_Sql语句 = 局_Sql语句 + “datetime('” + startDate + “','start of day') and tk_create_time < datetime('” + endDate + “','start of day')” .如果真结束 .如果真 (组合框2.现行选中项 = 1) ' 今天 局_Sql语句 = 局_Sql语句 + “DATETIME ('now','start of day','+0 day') and tk_create_time < DATETIME ('now','start of day','+1 day')” .如果真结束 .如果真 (组合框2.现行选中项 = 2) ' 昨天 局_Sql语句 = 局_Sql语句 + “DATETIME ('now','start of day','-1 day') and tk_create_time < DATETIME ('now','start of day','+0 day')” .如果真结束 .如果真 (组合框2.现行选中项 = 3) ' 本周 局_Sql语句 = 局_Sql语句 + “DATETIME ('now','start of day','-6 day','weekday 1') and tk_create_time < DATETIME ('now','start of day','+1 day','weekday 1') ” .如果真结束 .如果真 (组合框2.现行选中项 = 4) ' 本月 局_Sql语句 = 局_Sql语句 + “DATETIME ('now','start of month','+0 month','-0 day') and tk_create_time < DATETIME('now','start of month','+1 month','0 day')” .如果真结束 .如果真 (组合框2.现行选中项 = 5) ' 上月 局_Sql语句 = 局_Sql语句 + “DATETIME ('now','start of month','-1 month','-0 day') and tk_create_time < DATETIME ('now','start of month','+0 month','-1 day')” .如果真结束 .如果真 (组合框2.现行选中项 = 6) ' 今年 局_Sql语句 = 局_Sql语句 + “DATETIME ('now','start of year','-1 year','-0 day') and tk_create_time < DATETIME ('now','start of year','+0 year','-1 day')” .如果真结束