Forums
This topic is locked
Date format: PHP Binding format
Posted 03 Oct 2003 01:18:50
1
has voted
03 Oct 2003 01:18:50 Kent Livingston posted:
I'm wrestling with the new MX2004 and maybe this is the "same as the old boss" or I'm just getting dumber....I've got a page that displays dates from mySQL and I want the dates to show in a typical USA format of
month date, year. Maybe sometimes day of the month, month date, year.
I thought that in the past I had highlighted the field on the page, gone to bindings, format and select the right format. I do this but whatever format I select it displays 12/31/1969, (unless I select none which shows the right native format) which must be some default. Where am I going wrong with this... TIA.
Replies
Replied 04 Oct 2003 06:04:49
04 Oct 2003 06:04:49 Tim Olson replied:
It is best to use the database server as much as possible and use your application server for everything elst (my opinion). Why don't you try using this in you SQL statement instead of your standard date column.
SELECT date_format(date, '%W %M %D') as date
Obviously changing 'date' to whatever your date column is called
SELECT date_format(date, '%W %M %D') as date
Obviously changing 'date' to whatever your date column is called