Forums

table view format date field

Pkoll 28 Nov, 2024

Hi Max,

Is it possible to display in a table view to change the format from a date field. Now it shows the database date.

Can you give me a solution. I have tried it with an output field, but how to change the look.

Greetings,

Paul

Max_admin 28 Nov, 2024

I do not understand, you need to display a date in a different format or display a calendar field ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Pkoll 28 Nov, 2024

Hi Max,

I have a column  defined in the table view in which a date is shown. Is it possible to display this date in a certain format?

that's mine question.

Paul

Max_admin 29 Nov, 2024
Answer

of course, use a PHP action:

echo gmdate("Y-m-d", strtotime($this->get("row.column-name")));
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Pkoll 29 Nov, 2024
1 Likes

Thanks Max,

That was I looking for. It works the way I want.

Paul

BigStef 27 Jan, 2025

Hi there,

I have tried your solution which work great, thank you :)

Now I have tried with :

echo gmdate("d F Y", strtotime($this->get("row.column-name")));

But I get the month's name in english instead of French expected. Any advice ?

Max_admin 27 Jan, 2025

as noted in another post, you need this code for a french version:

setlocale(LC_TIME, 'fr_FR.UTF-8');
echo strftime('%d %B %Y'); // Outputs: 25 janvier 2025
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.