Date Filter in Report Designer
-
- Posts: 651
- Joined: 30 Oct 2017, 11:24
- Name: Enis Hemedoglu
- Location: Istanbul, Turkey
- Company Name: SCORE DANISMANLIK
- Contact:
Date Filter in Report Designer
Dear Sergey,
I have designed a new report using Report Designer. I think there is a bug with date filter.
When I set the view mode to year in the date filter in filters panels, it works very well, but if I set the date filter to month or day, it doesn't work.
I have designed a new report using Report Designer. I think there is a bug with date filter.
When I set the view mode to year in the date filter in filters panels, it works very well, but if I set the date filter to month or day, it doesn't work.
- support
- Site Admin
- Posts: 6215
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: Date Filter in Report Designer
If filter by month you have to use '%Y-%m' and '%Y-%m-%d' for days. See examples:
Code: Select all
from_unixtime(e.field_333,'%Y-%m') = [filter_by_date]
from_unixtime(e.field_333,'%Y-%m-%d') = [filter_by_date]
-
- Posts: 651
- Joined: 30 Oct 2017, 11:24
- Name: Enis Hemedoglu
- Location: Istanbul, Turkey
- Company Name: SCORE DANISMANLIK
- Contact:
Re: Date Filter in Report Designer
Yes, I am using these codes but it does not work.
support wrote: ↑29 Jul 2022, 13:19 If filter by month you have to use '%Y-%m' and '%Y-%m-%d' for days. See examples:Code: Select all
from_unixtime(e.field_333,'%Y-%m') = [filter_by_date] from_unixtime(e.field_333,'%Y-%m-%d') = [filter_by_date]
- support
- Site Admin
- Posts: 6215
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: Date Filter in Report Designer
show me your sql query
-
- Posts: 651
- Joined: 30 Oct 2017, 11:24
- Name: Enis Hemedoglu
- Location: Istanbul, Turkey
- Company Name: SCORE DANISMANLIK
- Contact:
Re: Date Filter in Report Designer
My code is as follows
Code: Select all
select
sum(e.field_794 * e.field_1068) as tutar,
sum(e.field_794 * e.field_879) as agirlik,
(select
f.field_777 from app_entity_62 f where f.id = e.field_825) as urun,
e.field_826 as tarih
from app_entity_64 e
where FROM_UNIXTIME(e.field_826, '%Y-%m-d') = [filter_by_date]
group by e.field_825, FROM_UNIXTIME(e.field_826, '%Y-%m-d')
order by (select
f.field_777 from app_entity_62 f where f.id = e.field_825), e.field_826
- support
- Site Admin
- Posts: 6215
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: Date Filter in Report Designer
Missed % near -d. The correct code is:
Code: Select all
FROM_UNIXTIME(e.field_826, '%Y-%m-%d') = [filter_by_date]
-
- Posts: 651
- Joined: 30 Oct 2017, 11:24
- Name: Enis Hemedoglu
- Location: Istanbul, Turkey
- Company Name: SCORE DANISMANLIK
- Contact:
Re: Date Filter in Report Designer
Ok. I placed the % near d, but again it is not working.
- support
- Site Admin
- Posts: 6215
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: Date Filter in Report Designer
There is option to debug query so you can turn it ON and see how query looks and fix it.
-
- Posts: 651
- Joined: 30 Oct 2017, 11:24
- Name: Enis Hemedoglu
- Location: Istanbul, Turkey
- Company Name: SCORE DANISMANLIK
- Contact:
Re: Date Filter in Report Designer
Well you can see the debug query in screenshot. I think there is not wrong in query. It works when I use year for time filter and doesn't work when I use month or day for time filter.
- support
- Site Admin
- Posts: 6215
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: Date Filter in Report Designer
Try this
'[filter_by_date]' - with quotes.
Code: Select all
FROM_UNIXTIME(e.field_826, '%Y-%m-%d') = '[filter_by_date]'