support wrote: ↑31 Jul 2022, 15:53 Try this'[filter_by_date]' - with quotes.Code: Select all
FROM_UNIXTIME(e.field_826, '%Y-%m-%d') = '[filter_by_date]'
Date Filter in Report Designer
-
- 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
It works thanks very much.
Re: Date Filter in Report Designer
Dear all,
I had a problem with a date filter where the date delimiter (-) was used as a math operator (The filter subtracted the month number from the year).
I solved it in the following way:
WHERE from_unixtime(e.field_1621, '%Y-%m') = "[filter_by_date]" (double quotes)
However, the problem remains that the datepicker control still does not pick up the defined language, but the expressions are only in English regardless of the selected language (Currently Croatian!).
I had a problem with a date filter where the date delimiter (-) was used as a math operator (The filter subtracted the month number from the year).
I solved it in the following way:
WHERE from_unixtime(e.field_1621, '%Y-%m') = "[filter_by_date]" (double quotes)
However, the problem remains that the datepicker control still does not pick up the defined language, but the expressions are only in English regardless of the selected language (Currently Croatian!).
-
- 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 have the same language problem.
zeljkoK wrote: ↑28 Oct 2022, 11:50 Dear all,
I had a problem with a date filter where the date delimiter (-) was used as a math operator (The filter subtracted the month number from the year).
I solved it in the following way:
WHERE from_unixtime(e.field_1621, '%Y-%m') = "[filter_by_date]" (double quotes)
However, the problem remains that the datepicker control still does not pick up the defined language, but the expressions are only in English regardless of the selected language (Currently Croatian!).
datepicker.png
- support
- Site Admin
- Posts: 6215
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: Date Filter in Report Designer
File from archive replace to plugins\ext\classes\report_page\
Now calendar picker should be in correct language.
Let me know if it works ok.
Now calendar picker should be in correct language.
Let me know if it works ok.
- Attachments
-
- report_filters.zip
- (1.32 KiB) Downloaded 92 times
Re: Date Filter in Report Designer
Dear Sergey,
excelent work. Calendar picker is now OK.
However, the output phrase ($output_value = (date('F Y', strtotime('[filter_by_date]')));) is still in English.
excelent work. Calendar picker is now OK.
However, the output phrase ($output_value = (date('F Y', strtotime('[filter_by_date]')));) is still in English.
-
- 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
I have this code to solve this problem. It is for Turkish.
Code: Select all
$date = '[filter_by_date]';
$date = explode("-", $date);
switch ($date[1]) {
case "01":
$month = "Ocak";
break;
case "02":
$month = "Şubat";
break;
case "03":
$month = "Mart";
break;
case "04":
$month = "Nisan";
break;
case "05":
$month = "Mayıs";
break;
case "06":
$month = "Haziran";
break;
case "07":
$month = "Temmuz";
break;
case "08":
$month = "Ağustos";
break;
case "09":
$month = "Eylül";
break;
case "10":
$month = "Ekim";
break;
case "11":
$month = "Kasım";
break;
case "12":
$month = "Aralık";
break;
}
$date = $month . " " . $date[0];
$output_value = $date;
- support
- Site Admin
- Posts: 6215
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: Date Filter in Report Designer
Because date() this is default PHP function. App has own function i18n_date() that you can use (the same format as in date())
- support
- Site Admin
- Posts: 6215
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: Date Filter in Report Designer
Example:
Code: Select all
$output_value = i18n_date('F Y',strtotime('[filter_by_date]'));