Hi all,
I have read a lot about date formatting and I have tried most methods. This is the method I have found to work well.
I use a script provided by Anthony Garrett (www.tarrget.info/calendar/scw.htm) which provides a calendar popup so you can select click on the date which puts it in the data input field. Anthony provides this calendar script free of charge under a GNU Lesser General Public License. many thanks to Anthony.
MySQL TABLE NAME "date_test"
Data table field type = "date"
Data field name = "f_date"
USER INPUT FORM
User input field =
<input name="f_date" type="text" id="f_date" onclick='scwShow(this,this);' value="" />
The Calendar script will place a date into the data field in the format of "YYYY-MM-DD".
To display the date I use the following.
<?php echo date('d m Y', strtotime($row_date_test['f_date'])); ?>
This displays the date as "DD-MM-YYYY"
So if the date entered selected from the popup calendar is "2007-04-14" the date display is "14-04-2007"
I hope this helps someone as it has me.