# Unable to export CSV invalid-bind error #6


vvgh21 commented on Oct 10
I get the following error when trying to use the plugin whether used through the UI or through the API:
Error exporting data to CSV: Invalid bind-variable name ':00'
Could you please help with this
Thank you
Feel free to reply if anything else is needed from my end



Author
vvgh21 commented on Oct 24
@jorgeuos can you help here?


Owner
jorgeuos commented on Oct 24
Hi,

I saw the issue but forgot to reply.
I'll take a look over the weekend.

Hold tight!

vvgh21 commented yesterday
@jorgeuos Could you check?


Owner
jorgeuos commented yesterday
Yes, sorry,

I haven't forgotten, just been really busy.

I'll take a look today.

jorgeuos commented 10 hours ago
Hi,

I couldn't replicate the error, could you provide me with more information?

Server type
PHP version
etc..

The error:

Invalid bind-variable name ':00'
Suggests that there's a binding issue with SQL query in PHP, are you perhaps using the wrong Date format?
Should be YYYY-MM-DD

Perhaps your browser is trying to set a different format.

I also fixed some unrelated issues, could that probably solve this issue too?

Sincerely,
Jorge

vvgh21 commented 7 hours ago
Unfortunately, the update didnt fix the issue.
The format seems to be correct in the query executed, here's a snippet from log viewer:

No data to export for the specified period.

```sql
SQL: 
SELECT *
FROM matomo_log_visit AS mlv
LEFT JOIN matomo_log_link_visit_action ON mlv.idvisit = matomo_log_link_visit_action.idvisit
LEFT JOIN matomo_log_action ON matomo_log_action.idaction = matomo_log_link_visit_action.idaction_url
LEFT JOIN matomo_log_conversion ON mlv.idvisit = matomo_log_conversion.idvisit
LEFT JOIN matomo_log_conversion_item ON mlv.idvisit = matomo_log_conversion_item.idvisit
WHERE visit_last_action_time >= "2024-09-08 00:00:00"
AND visit_last_action_time <= "2024-09-08 23:59:59"
AND mlv.idsite = 2;
```