No announcement yet.

Using Date and Time in a query in the API

  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Date and Time in a query in the API

    Simple API request using the /Orders endpoint.

    I'm seeing very weird results when using the startdate and enddate parameters. If I use a time in the query I think it automatically assumes the time is PM. So for example, I want to get all the orders since 9:00 am, but the query returns me all orders from 9:00 PM...

    Example Query:
    countonly: 1,
    datestart: '05/08/2018 9:00:00',
    dateend: '05/08/2018 10:47:07',
    orderstatus: 1

    I tried appending AM/PM to the end of the times, but it doesn't help. Has anyone been able to get time specific queries to work using the API? Please help.

    According to the documentation the format is just mm/dd/yyyy hh:mm:ss. So I would expect it to be a 24 hour clock system... but it doesn't seem to be.


  • #2
    Hey Ozzyonfire,

    Shavoy here from 3dcart. I have open up a ticket with our developers to look into this matter. I would suggest opening up a ticket at [email protected] so that we can troubleshoot this on your domain, as well as apply a fix to your site if one is needed.

    The issue has been resolved
    Last edited by 3dcart-Shavoy; 05-11-2018, 10:43 AM. Reason: Update: