How to download Data between two dates from date to date

Hi,
I am hoping to receive an answer to my question,
can we download data between two dates Example select data from 15-02-2021 to 25-02-2021
like in the screenshot.

Thanks,

Welcome to the community, @Ahmad1! This is a feature that KoBoToolbox does not support at the moment. We already have a features request for this:

Maybe you could VOTE for the same to make this a reality.

As a temporary workaround maybe you could follow this post which should solve your issue:

Hi @Ahmad1, this is possible, but unfortunately there is currently no UI to easily create the filtered export. To do this, you can navigate to the following URL with your ASSET_UID and KF_URL depending on the server you are using:

https://<KF_URL>/api/v2/assets/<ASSET_UID>/exports/

for example:

HHI

https://kf.kobotoolbox.org/api/v2/assets/arhhVdJxyFxguzdyhuDZWb/exports/

OCHA

https://kobo.humanitarianresponse.info/api/v2/assets/arhhVdJxyFxguzdyhuDZWb/exports/

Then paste the following JSON in the “Content” field in the form at the bottom of the page (ensure that the “Raw data” tab is selected) and click the POST button:

{
  "fields_from_all_versions": true,
  "group_sep": "/",
  "hierarchy_in_labels": true,
  "lang": "_default",
  "multiple_select": "both",
  "type": "xls",
  "xls_types_as_text": false,
  "include_media_url": true,
  "query": {
    "$and": [
      {
        "_submission_time": {
          "$gte": "2021-02-15"
        }
      },
      {
        "_submission_time": {
          "$lte": "2021-02-25"
        }
      }
    ]
  }
}

You can then navigate back to the KoBoToolbox UI and download the export as normal:

3 Likes

Hi Josh,
can you please tell me if it is possible to use the same technique to create an advanced export to be used for a synchronous data export ?

  • containing only certain fields
  • with “dynamic” dates (e.g.: export of all data posted since less than 7 days)
  • named

Thanks a lot for your support.
Serge

edit : I found how to do it using this URL :

https://kobo.humanitarianresponse.info/api/v2/assets/<ASSET_UID>/export-settings/

the dates are not “dynamic” but this already covers 90% of my needs

Good afternoon.
I did what you said.
Can you tell me what this error is related to?