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 1094117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:55:36+00:00 2026-05-16T23:55:36+00:00

I will have a table with datetime column Let’s name it TmStamp with data

  • 0

I will have a table with datetime column

Let’s name it TmStamp with data 01/01/2001 01:00:PM

there is another date column, Let’s name it RegDate with data 01/01/2001

I want to select data with that date.

So I write

SELECT * FROM TABLE WHERE RegDate>=#01/01/2001# and RegDate<=#01/01/2001#

I get data for 01/01/2001.

HOWEVER,

SELECT * FROM TABLE WHERE TmStamp >=#01/01/2001# and TmStamp <=#01/01/2001#

I get nothing

I will get data for 01/01/2001 only if I do like this..

SELECT * FROM TABLE WHERE TmStamp >=#01/01/2001# and TmStamp <=#02/01/2001#

Dates are in DD/MM/YYYY format.

Any idea why is that?

  • 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-05-16T23:55:37+00:00Added an answer on May 16, 2026 at 11:55 pm

    In MS Access a Date/Time field always has a Time component. The RegData field has time of 00:00:00 so Access is not displaying it to you and the following query will work

    SELECT * FROM TABLE WHERE RegDate>=#01/01/2001# and RegDate<=#01/01/2001#
    

    You first TmStamp query is actually running this

    SELECT * FROM TABLE WHERE TmStamp >=#01/01/2001 00:00:00# and TmStamp <=#01/01/2001 00:00:00#
    

    As the TmStamp field has times it will not show any results.

    What you need to do for Date/Time fields with a time other than 00:00:00 is run this query

    SELECT * FROM TABLE WHERE TmStamp >=#01/01/2001# and TmStamp <#02/01/2001#
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table 'customertransactions' with a column 'transactiondate' of type DateTime. I will
Let's assume I have a table with a CreatedBy Datetime column with a default
I have a table, let's call it My_Table that has a Created datetime column
I have a table which will have a date/time column to store create date
I have created an archive table which will store data for selecting only. Daily
Possible Duplicate: Datetime vs Timestamp? I have a Mysql table, which has a column
I have a table full of data, where one column is full of different
I have a MySQL db with a table containing a datetime column. However, I
I have a SQL Server table containing a TEXT column and a DATETIME column
I have 2 classes: [Table(Name = _Reference2)] public class Customer { [Column(Name = _IDRRef)]

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.