In article <11*********************@c13g2000cwb.googlegroups. com>,
se****@gmail.com says...
hi there,
can anyone there teach me how to solve this?
my table - date field value return 1965-06-20, i want to display this
value in d-m-Y format.
how to print? now i only get it print as 01/01/1970 if the year<1970.
i know there is an adodb_date function. but then how can i convert
this value to time format as i also cannot use the strtotime function?
strtotime also return as -1. which also error.
help..
thank you
SQL has the solution.
Syntax may differ depending on the backend Database (Access over ODBC?)
but what you want is something like:
SELECT DATE_FORMAT('dd-mm-YYYY', DateField) AS 'Date' FROM items;
Lookup the DATE_FORMAT for exact values available in the format field.
Note of advice:
Avoid confusing dates such as 02-01-01
Jan 1st? Feb 2nd? 2001? or 2002? ... 1902?
Particularly when producting any sort of information accessed by the
public, or many people, or used for historic references.
If you can, leave it in international format or use '01 Jan 2005', etc.
--
AJ
Treehouse Networks abuse@
www.treenetnz.com