I get data from a database in YYYY-mm-dd
format, but I want to show just dd.mm
(example - I get 2010-05-28
; I want to show 28.05
)
Could you help me?
Thanks
I get data from a database in YYYY-mm-dd
format, but I want to show just dd.mm
(example - I get 2010-05-28
; I want to show 28.05
)
Could you help me?
Thanks
You can use the date_format
function to format the data as it comes out of the database. For example:
mysql> select tf, date_format(tf, '%d.%m') from times;
+---------------------+--------------------------+
| tf | date_format(tf, '%d.%m') |
+---------------------+--------------------------+
| 2010-11-02 00:00:00 | 02.11 |
+---------------------+--------------------------+