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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:20:42+00:00 2026-06-04T02:20:42+00:00

Im currently trying to run a SQL query to export data between a certain

  • 0

Im currently trying to run a SQL query to export data between a certain date, but it runs the query fine, just not the date selection and i can’t figure out what’s wrong.

SELECT 
    title AS Order_No, 
    FROM_UNIXTIME(entry_date, '%d-%m-%Y') AS Date, 
    status AS Status,
    field_id_59 AS Transaction_ID,  
    field_id_32 AS Customer_Name, 
    field_id_26 AS Sub_Total, 
    field_id_28 AS VAT, 
    field_id_31 AS Discount, 
    field_id_27 AS Shipping_Cost, 
    (field_id_26+field_id_28+field_id_27-field_id_31) AS Total 
FROM 
    exp_channel_data AS d NATURAL JOIN
    exp_channel_titles AS t
WHERE 
    t.channel_id = 5 AND FROM_UNIXTIME(entry_date, '%d-%m-%Y') BETWEEN '01-05-2012' AND '31-05-2012' AND status = 'Shipped'  
ORDER BY 
    entry_date DESC
  • 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-04T02:20:44+00:00Added an answer on June 4, 2026 at 2:20 am

    As explained in the manual, date literals should be in YYYY-MM-DD format. Also, bearing in mind the point made by @ypercube in his answer, you want:

    WHERE t.channel_id = 5
      AND entry_date >= UNIX_TIMESTAMP('2012-05-01')
      AND entry_date <  UNIX_TIMESTAMP('2012-06-01')
      AND status = 'Shipped'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently trying to run a LINQ query over a MS SQL database. This
I'm currently trying to run a certain procedure (sql 2005) in VB6, passing some
I am trying to get a sql query to run on drop down menu
I'm trying to run a query in SQL Server 2008 against a table where
I'm trying to run a webmethod via a jQuery which will query an SQL
This SQL query was generated by Microsoft Access 2003, and works fine when run,
i am currently trying to run a web crawler through the terminal. it compiles
I am trying to do run a bulk deletion using parameterized queries. Currently, I
I'm currently trying to port an app from asp.net to php, however I just
We are trying to run a query to get all unpaid invoices. When I

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.