Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8081497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:44:43+00:00 2026-06-05T16:44:43+00:00

can anyone tell me how to select data by date in MS.ACCESS database using

  • 0

can anyone tell me how to select data by date in MS.ACCESS database using PHP?
I’m trying to select data for example (absent = 14/06/2012 13:00:00) using a wildcard (absent = 14/06/2012*)

Here are my query

$sql = "SELECT TOP 1 * FROM absent WHERE id = $id AND absent LIKE '#14/06/2012#'"
$result = odbc_exec($connect, $sql);

absent field have a Date (General Date) Type. while id = AutoNumber.

I got no result, using that query. Where is my mistake?

already trying this

absent = #14/06/2012#
absent = '14/06/2012*'

but not success.

EDIT
Well, i have succedd but not using a wild card. Here are my solution, I’m using a range date to limit the search

WHERE absent >= #14/06/2012 AND absent < #15/06/2012#;

Damn you Ms-Access!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T16:44:45+00:00Added an answer on June 5, 2026 at 4:44 pm

    I can’t try my answers, since I don’t have php available, but here are a few ideas
    (assuming that Absent is a Date field).

    • LIKE makes a string comparison, so I would not include the # when using LIKE.
    • for the same reason you definitely should include the quotes ' or " otherwise you will get a division
    • This is all US products, so I would try dates in mm/dd/yyyy format

    There fore my guess would be absent LIKE '06/04/2012*'

    Other – perhaps less efficient, but safer – criteria could be:

    ...AND day(absent) = 14 AND month(absent) = 6 AND year(absent) = 2012
    

    or

    ... AND Format(Absent, "dd\/mm\/yyyy") = "14/06/2012"
    

    Good luck

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone tell me if there is a way to select a video from
Can anyone tell me why this works in mysql? update routing_policy set priority=''-1 where
Can anyone tell the block animation equivalent of this below code snippet? [UIView beginAnimations:@View
can anyone tell me how to extract images from a video? what i ve
Can anyone tell me why the black borders are appearing in the emulator, and
Can anyone tell me what reasons exceptions can have, not to be compatible with
Can anyone tell me why this query would return this record? query: db.sales.findOne({qualified: true,
can anyone tell me and describe what oodbms implementation can be used for productive
Can anyone tell me how I can assign a click function to particular coordinates
can anyone tell me how can I put multiple text input fields in one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.