[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • Last Modified:

( PHP ) How do I display MySQL Date Formatted?

Hi,

I can insert the current date into mysql and display it no problem,
but the formatting is not that nice when it gets displayed.

How can I make the date display like this = 08.05.06

Thanks
0
babyboy808
Asked:
babyboy808
1 Solution
 
tolgaongCommented:
echo date("d.m.y");

to insert  to mysql
$mysqldate=date ("Y-m-d");
0
 
dr_dedoCommented:
u can do it directly from mysql
SELECT date_format(myDate, '%d.%m.%y') as date FROM table1;
0
 
babyboy808Author Commented:
thanks dr dedo
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now