Forums

How to Export data as XLS with selected date range?

sinivasan 20 May, 2015
Hello,

I have 2 date picker field in my form which are From date and To date.

I would like to export the table data to XLS file with date specified from the above two said fields.

(I tried with DB Read to export whole table as XLS, but I do not know how to do with date ranges)

These are my table headers:
id, date, comment, order_no.

Any idea/suggestion, please!

Thanks.
GreyHead 20 May, 2015
Hi sinivasan,

Please try this in the Conditions box:
<?php
return array( 'date >' => $form->data['start_date'], 'date <' => $form->data['end_date']);
?>
I'm not certain that it will work but using a Debugger should show you the query being created so that you can tweak it.

Bob
This topic is locked and no more replies can be posted.