请大家好吗? 从YourTable选择你的领域WHERE YourDateTime 之间(DateSerial(2003,9,10)+ TimeSerial(22,0,0)) 和(DateSerial(2003,9,11))+ TimeSerial(7,30,0)); HTH - Peter - 请不要邮件。 My table has a record called date/time - filled (not surprisingly) with adate and time. I can format the date in one query field, also the time,using format in an expression. My user wants me to provide a listing of alltable entries between 22:00 and 07:30 the next day, between a given set ofdates (typically one week apart but in practice between any datesspecified). My query works ok for 1 date - entering 2 dates, one for 22:00 - 23:59 andanother for 00:00 - 07:30, but for a whole date range... Any help pleaseguys? Lap--Thanks,Chris cc****@NOSPAMeclipse.co.uk 解决方案 SELECT YourFields FROM YourTable WHERE YourDateTimeBetween (DateSerial(2003,9,10)+TimeSerial(22,0,0))And (DateSerial(2003,9,11))+TimeSerial(7,30,0)); HTH - Peter --No mails please. SELECT YourFields FROM YourTable WHERE YourDateTime Between (DateSerial(2003,9,10)+TimeSerial(22,0,0)) And (DateSerial(2003,9,11))+TimeSerial(7,30,0)); HTH - Peter -- No mails please.time, using format in an expression. My user wants me to provide a listingofsetplease guys? SELECT YourFields FROM YourTable WHERE YourDateTime Between (DateSerial(2003,9,10)+TimeSerial(22,0,0)) And (DateSerial(2003,9,11))+TimeSerial(7,30,0)); HTH - Peter -- No mails please. 这篇关于日期/时间查询帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-22 11:37