Page 2 of 2
Re: Date Filter in Report Designer
Posted: 31 Jul 2022, 17:06
by enishemed
It works thanks very much.
support wrote: ↑31 Jul 2022, 15:53
Try this
Code: Select all
FROM_UNIXTIME(e.field_826, '%Y-%m-%d') = '[filter_by_date]'
'[filter_by_date]' - with quotes.
Re: Date Filter in Report Designer
Posted: 28 Oct 2022, 11:50
by zeljkoK
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!).
Re: Date Filter in Report Designer
Posted: 28 Oct 2022, 12:26
by enishemed
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
Re: Date Filter in Report Designer
Posted: 28 Oct 2022, 18:47
by support
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.
Re: Date Filter in Report Designer
Posted: 31 Oct 2022, 15:21
by zeljkoK
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.
Re: Date Filter in Report Designer
Posted: 31 Oct 2022, 18:49
by enishemed
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;
zeljkoK wrote: ↑31 Oct 2022, 15:21
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.
output.png
Re: Date Filter in Report Designer
Posted: 02 Nov 2022, 07:46
by support
Because date() this is default PHP function. App has own function i18n_date() that you can use (the same format as in date())
Re: Date Filter in Report Designer
Posted: 05 Jan 2023, 09:50
by support
Example:
Code: Select all
$output_value = i18n_date('F Y',strtotime('[filter_by_date]'));