DATE_FORMAT() is a highly versatile and concise tool to reformat your datetime stamp within the query (before it hits the php layer).
The advantage of using a pure MySQL solution is that you are faaar less likely to need to adjust this syntax versus needing to adjust a Joomla syntax because of a version change.
Using pure MySQL also results in less overhead/handling, so it will peeform more efficiently.
Here are some pertinent format specifiers:
%m
-> Month, numeric (00..12)
%ac
-> Month, numeric (0..12)
%d
-> Day of the month, numeric (00..31)
%e
-> Day of the month, numeric (0..31)
%Y
-> Year, numeric, four digits
%y
Year, numeric (two digits)
I believe you are wanting zero-padded days and months and a four-digit year, so my recommended SELECT
query looks like this:
SELECT DATE_FORMAT(`timestamp`, '%d-%m-%Y') AS `Eurodate`
DBFiddle Demo