Ò»¡¢Êý¾Ý´°ÖУº ¶¨ÒåÁ½¸ödatetimeÐͲÎÊý£¬at_from,at_end,£¨¿ªÊ¼£¬½áÊø£© where Ìõ¼þд³É£º where col_date >= :at_from and col_date < :at_end È磬1997-12-12 µ½ 2000-01-02 Ôò¼ìË÷ʱ¾ÍÕâÑù´¦Àí£º datetime lt_from,lt_end lt_from = datetime(date('1997-12-12),time('00:00:00')) lt_end = datetime(date('2000-01-03',time('00:00:00')) dw_xxx.retrieve(lt_from,lt_end) ÕâÑù¼ìË÷³öÀ´µÄÊý¾Ý¾ÍÊǾø¶Ô·ûºÏÌõ¼þµÄ¡£ ¶þ¡¢Êý¾Ý´°¹ýÂË£º ls_filter = & ' string(col_date,"yyyy-mm-dd") >="'+string(date1,'yyyy-mm-dd')+'" and string(col_date,"yyyy-mm-dd") <="'+string(date2,'yyyy-mm-dd')+'"' dw_xxx.setfilter(ls_filter) dw_xxx.filter() dw_xxx.sort() // °´Ôʼ˳ÐòÅÅÐò¡£ Èý¡¢Èç¹ûÊÇǶÈëSQLÓï·¨µÄʱ¼ä²éѯ£¬Ôò£º MSS sql Server,Sybase SYB,Sybase SQL AnywhereÖÐ select * from table_xxx where beg_time >= ('2000-08-15 12:20:25:000'); ORACLEÖУº beg_time >= '15-9ÔÂ-2000' ; // Ææ¹ÖµÄ¸ñʽ¡£ ÆäËû£º ¿ÉÒÔͨ¹ý¸ÃRDBMSËù´øµÄ sql ¹¤¾ßÀ´Ö´Ðвéѯ£¬select beg_time from xxx ,È»ºóµÃ³ö¸ñʽ |