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

  • Home
  • SEARCH
  • 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 335061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:06:49+00:00 2026-05-12T10:06:49+00:00

I’ve been having some ‘strange’ results while comparing dates. table1 has two rows with

  • 0

I’ve been having some ‘strange’ results while comparing dates.
table1 has two rows with TIMESTAMPS values 2009-08-26 23:39:56 and 2009-08-27 00:01:42
When I make this query:

select * from table1 c
INNER JOIN table2 r ON r.table1_id = c.id
WHERE DATE(c.authorization_date) = '2009-08-26'

it returns both rows (when it only should have returned one).

For added weirdness the rows in the returned resultSet have tha same value: 2009-08-26 23:39:56

But If I make this query:

SELECT DATE(authorization_date) FROM table1

It correctly returns two rows with values 2009-08-26 and 2009-08-27

So, here comes my questions. How could I make the comparison so the correct result is returned, what am i doing wrong? Could be related to the inner join?

  • 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-12T10:06:49+00:00Added an answer on May 12, 2026 at 10:06 am

    I suspected:

    • some timezone discrepency, but you seem to have accounted for that

    • some other data that is confusing the problem… is there something else that could be interfering?

    Wish I could recreate this and help. Here’s my setup code. What am I missing?

    mysql> create table table1 (id integer primary key auto_increment, authorization_date TIMESTAMP);
    mysql> insert into table1 values (1, '2009-08-26 23:39:56');
    mysql> insert into table1 values (2, '2009-08-27 00:01:42');
    mysql> create table table2 (table1_id integer);
    mysql> insert into table2 values (1);
    mysql> insert into table2 values (2);
    
    
        mysql> SELECT DATE(authorization_date) FROM c;
        +--------------------------+
        | DATE(authorization_date) |
        +--------------------------+
        | 2009-08-26               | 
        | 2009-08-27               | 
        +--------------------------+
    
        mysql> select * from table1 c INNER JOIN table2 r ON r.table1_id = c.id WHERE DATE(c.authorization_date) = '2009-08-26';
        +----+---------------------+-----------+
        | id | authorization_date  | table1_id |
        +----+---------------------+-----------+
        |  1 | 2009-08-26 23:39:56 |         1 | 
        +----+---------------------+-----------+
        1 row in set (0.00 sec)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 189k
  • Answers 189k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Not to say that this is impossible, but I've not… May 12, 2026 at 5:46 pm
  • Editorial Team
    Editorial Team added an answer If you are using MSDTC, then you will need the… May 12, 2026 at 5:46 pm
  • Editorial Team
    Editorial Team added an answer There is nothing you have to do : all strings… May 12, 2026 at 5:46 pm

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a French site that I want to parse, but am running into
I have text I am displaying in SIlverlight that is coming from a CMS
I am currently running into a problem where an element is coming back from

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.