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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:28:02+00:00 2026-06-18T09:28:02+00:00

How to make the query to retrieve from database only the records that have

  • 0

How to make the query to retrieve from database only the records that have the time equals to ‘today’. I store my dates as long.

E.g:
DateColumn (The name of my column) and the name of my table is MyTable

1360054701278 (Tuesday, February 5, 2013 8:58:21 AM GMT)
1359795295000 (Saturday, February 2, 2013 8:54:55 AM GMT)

So how should I make the query for this example in order to retrieve the first record (because it is the date equal to today)?

Any suggestion would be appreciated.
Thanks

  • 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-18T09:28:03+00:00Added an answer on June 18, 2026 at 9:28 am

    sorry for not seeing that, your problem were the additional milliseconds saved in your column.

    The solution was to remove them by division 😉

    SELECT * FROM MyTable WHERE date(datetime(DateColumn / 1000 , 'unixepoch')) = date('now') 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a query that must to retrieve some data from my
I am trying to make a query that will insert multiple values from my
I'm trying to retrieve data from database using criteriabuilder. It's working great, query is
I'm trying to retrieve information from database with submit buttons , which have the
I have a search.jsp page where I search & retrieve a record from Database.
I have a PHP document that query's a MYSQL database based on the input
I have the following line code used to retrieve data from database: DataTable newEquipmentTable
Let's suppose that database is big. I have a very complex query for search
I make a query: String query = SELECT DISTINCT a FROM A a FETCH
I want to make a query to list cats that took longer than average

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.