sql access how to return between dates

前端 未结 4 2040
迷失自我
迷失自我 2020-12-11 18:29

How do I specify a date range in MS Access? Is the below query correct? Do I have to put \"2/1/2010\" in quotes? Or do I have to do something like date(2/

4条回答
  •  有刺的猬
    2020-12-11 19:06

    Ms access database uses the "#" for presenting dates. So if you want to write 13/12/2013 as ms access acceptable form then you have to write it as #13/12/2013#.

    An example sql query for table called "test" with two fields id, and date.

    select * from test where date=#13/12/2013#.

    An example of a sql query for vb.net 2008 to find the database records between two dates

    "select * from info_session where i_date between # " & startingdate & " # and # " & enddate & " #"

提交回复
热议问题