An error is returned when the access database queries data by date !, Access date

Source: Internet
Author: User

An error is returned when the access database queries data by date !, Access date

<span style="font-size:18px;">select * from sv_JFVoucher  where isDelete=0  and  [date]>= '2015-1-20 0:00:00'  and  [date]<= '2015-1-20 0:00:00'   order by id desc</span>

There is no error in executing this SQL statement in SqlServer08, but an error is reported when it is executed in the access database!

Baidu once said

<Span style = "font-size: 18px;"> change '2017-1-20 0:00:00 'to #2015-1-20 0:00:00 # </span>
</pre><p></p><pre>


<span style="font-size:18px;"><span style="background-color: rgb(240, 240, 240);">select * from sv_JFVoucher  </span></span>
<span style="font-size:18px;">where isDelete=0  and  [date]>= #2015-1-20 0:00:00#  and  [date]<= #2015-1-20 0:00:00#   order by id desc</span>

<Span style = "font-size: 18px;"> the operation was successful. I just got in touch with access, indicating that I was puzzled. </span>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.