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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:53:47+00:00 2026-06-14T01:53:47+00:00

I have a SQLITE DB with a string field which contains a date in

  • 0

I have a SQLITE DB with a string field which contains a date in the following format: “01.01.2012”.
What I want is to sort the by this string formatted date in a query.
I tried this without success:

SELECT * FROM fahrer, fahrzeuge, nutzungsarten, fahrtenbuch WHERE fahrtenbuch.nutzungsart_id = nutzungsarten._id AND fahrtenbuch.fahrzeuge_id = fahrzeuge._id AND fahrtenbuch.fahrer_id = fahrer._id ORDER BY strftime ('%d.%m.%Y', fahrtenbuch.startdatum)

What I am doing wrong?

  • 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-14T01:53:48+00:00Added an answer on June 14, 2026 at 1:53 am

    The values in the startdatum column are not in a format that SQLite recognizes, so you cannot use it as a parameter to strftime.
    (Even if it worked, the result would not be sorted correctly because that date format does not begin with the most significant field, the year.)

    You could try to extract the date fields so that the sorting is equivalent with the yyyy-mm-dd order:

    SELECT ...
    ORDER BY substr(startdatum, 7, 4),
             substr(startdatum, 4, 2),
             substr(startdatum, 1, 2)
    

    But I would recommend to convert the values into a supported format in the first place.

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

Sidebar

Related Questions

I have following text in SQLITE database in TEXT field The exact date of
I have a text field in SQLite database, which I want the user to
I have the following function for SQLite select statement public Boolean itemFound(String cartId,Long ItemId){
I have a string column which contains some numeric fields, but a lot are
I have a sqlite .db file which consists of data in string, int and
I have a database from which I want to query and display only that
I have an active record Song model with a songhash field (string(255)) that contains
I have a sqlite table for my android application. This table has a String
I have the following class which as you can see contains a EditText, Button
I have an sqlite database I want to distribute with my application. It's about

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.