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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:19:34+00:00 2026-05-27T00:19:34+00:00

I have a column c in table tbl which contains the following values. Tue,

  • 0

I have a column c in table tbl which contains the following values.

Tue, 15 Nov 2011 14:21:32 GMT
Tue, 15 Nov 2011 12:59:21 GMT
Tue, 15 Nov 2011 12:15:48 GMT
Tue, 15 Nov 2011 12:10:33 GMT
Tue, 15 Nov 2011 11:12:09 GMT
Tue, 15 Nov 2011 11:09:14 GMT
Tue, 15 Nov 2011 10:38:01 GMT
Tue, 15 Nov 2011 10:36:33 GMT
Tue, 15 Nov 2011 10:09:21 GMT
Tue, 15 Nov 2011 09:23:01 GMT
Tue, 15 Nov 2011 08:24:39 GMT
Mon, 14 Nov 2011 22:44:53 GMT
Mon, 14 Nov 2011 21:03:28 GMT
Mon, 14 Nov 2011 20:12:11 GMT
Mon, 14 Nov 2011 19:08:34 GMT
Mon, 14 Nov 2011 18:40:05 GMT
Mon, 14 Nov 2011 18:07:00 GMT
Mon, 14 Nov 2011 18:04:00 GMT
Mon, 14 Nov 2011 17:37:45 GMT

These values were taken from command:

select c from tbl;

When I run:

select count(*) from tbl where c < date('2011-11-18');

the result is 0

What is wrong here?

thank you

  • 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-27T00:19:35+00:00Added an answer on May 27, 2026 at 12:19 am

    What you have stored in your database are regular strings, not SQLite datetime strings.

    For the contents to TEXT column to be recognized as a datetime it must be stored in the format YYYY-MM-DD HH:MM:SS.SSS.

    To get the results you want out of the data you have, you will have to use string comparisons, and doing the < comparison that you want will be tricky (you’ll need to examine substrings and look for year < 2011 OR month IN (JAN,FEB,MAR. . .) OR (month = 'NOV' AND day < 18).

    Better to:

    1. Find where the data is inserted and change it to insert a “proper” SQLite date and

    2. Run a one-time routine over the existing data to reformat it.

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

Sidebar

Related Questions

I have a table named tbl.Products , which has a column named articlenumber and
I have the following table ID | tbl | reply | time --- -----
I have a user table from which I want all values, so I have
Let's say I have a table tbl with columns id and title . I
I have a table, call it TBL. It has two columns,call them A and
I have a 4 column table of products in template,each item in table has
Suppose I have a 2 column table (id, flag) and id is sequential. I
MS SQL Server 2000 I have a column in Table A called Name. I
I'm creating a 'similar items' link table. i have a 2 column table. both
I have a table column that needs to be limited to a certain width

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.