Ticker: Can't format date in template from Dataset


#1

In ticker template I can’t format date from a dataset.
In template:

[datestart|6]

Output:

2018-11-10 15:30:00

And in Advanced tab there isn’t Date format field like in others tickers.


#2

You can format a column containing a date inside your dataset in to a second column, in whatever format you want, and then show that in the layout.

eg

DateCol                   FormattedDateCol

2018-11-10 15:30:00       10/11/2018

Your FormattedDatCol would be a formula in your dataset, and would use the MySQL date formatting functions to generate the format you want.


#3

Ok, thanks.
But if I add in formula date_format(datestart, "%M" ) I get the month name in english instead of my language.
I should add SET lc_time_names = 'de_DE'; before the query, but how?


#4

I don’t think there’s a mechanism to allow you to do that. You would need to have the month names in your dataset already. The method I suggested I really meant was suitable for reformatting the numerical date around as you required.


#5

Thanks,
I can’t edit the JSON, so I did it with javascript.


#6

Hi.
I’m having the same localization problem. How did you solve it?

Thanks