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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:11:45+00:00 2026-06-03T00:11:45+00:00

Why is this SELECT strftime(‘%s’, timestamp,’localtime’) from locationLog WHERE strftime(‘%s’, timestamp,’localtime’) > 999999999999999999 ORDER

  • 0

Why is this

SELECT strftime('%s', timestamp,'localtime') from locationLog WHERE strftime('%s', timestamp,'localtime') > 999999999999999999 ORDER BY _id DESC

return any outputs when all of my rows have a lower value in “timestamp”

in my case the query above returns

1334735588
1334735349
1334734317
1334734178
1334734172
and so on...

it returns my whole table.

if I switch > to < it returns nothing.

I guess I’m trying to compare different type of variables or something like 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-06-03T00:11:47+00:00Added an answer on June 3, 2026 at 12:11 am

    You are comparing a text value with a integer value, so sqlite casts the integer value to text, and does a string comparison:

    sqlite> select strftime('%s', '2002-02-02', 'localtime');
    1012611600
    sqlite> select typeof(strftime('%s', '2002-02-02', 'localtime'));
    text
    sqlite> select typeof(999999999999999999);
    integer
    sqlite> select strftime('%s', '2002-02-02', 'localtime') > 999999999999999999;
    1
    sqlite> select cast(strftime('%s', '2002-02-02', 'localtime') as integer) > 999999999999999999;
    0
    

    As shown above, the solution is to cast the returned value of strftime to some numeric type.

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

Sidebar

Related Questions

Just see this: SELECT clientid,clientname,startdate,enddate,age FROM clients WHERE clientid IN (1,2,3,4,5) AND CASE WHEN
Question similar to this: select from two tables where linked column can be null
I'm trying this: SELECT FacilityID, FacilityName, CMSProviderID, [Provider Number] FROM G2_Facility, SCIPHospitalCompare WHERE [Provider
i have this SELECT COUNT(1) cnt, a.auther_id FROM `posts` a LEFT JOIN users u
Today I run this select 'exec sp_refreshview N''['+table_schema+'].['+table_name+']''' from information_schema.tables where table_type = 'view'
This is my query thus far: select C.ACCOUNTNO,C.CONTACT,KEY1,KEY4 from contact1 C left join CONTSUPP
I have a query as follows. select strftime('%Y-%m',A.traDate) as Month,sum(A.TraAmt) as Total,C.GroupType from TransactionTbl
This SELECT * FROM SOME_TABLE WHERE SOME_FIELD LIKE '%some_value%'; is slower than this SELECT
This is a simple select from a single table. The purpose is to select
If this: SELECT * FROM Table WHERE Date=( SELECT MAX(Date) FROM Table ) returns

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.