thanks for the hints date_format() solved my problem my select query in php is 
now
the following:

$query = "SELECT id, calltt, date_format(calldate, '%d-%b-%Y') AS calldate2,
date_format(calltime, '%H:%i') AS calltime2,area, problem, solution, assignto,
status FROM ticketing ";


hans

Rhino wrote:

> ----- Original Message -----
> From: "Hans Bernard" <[EMAIL PROTECTED]>
> To: <mysql@lists.mysql.com>
> Sent: Wednesday, April 06, 2005 6:06 AM
> Subject: DATE & TIME
>
> > Hello,
> >
> > i need to have the time in this output. in MySQL database
> > phpmyadmin always puts 0000-00-00
> >
> > i need it to be like this
> > 01-APR-2005  >> DD-MMM-YYYY
> >
> > the time needs to be like this
> > 22:55 >> HH:MM
> >
> > can somebody help
> >
> I am 99% sure that you cannot actually store dates or times in the formats
> that you want. However, I am also 99% sure that you *can* retrieve them in
> those formats by reformatting them when you retrieve them.
>
> I think you will find all of the information you need under "functions" in
> the MySQL manual. Unfortunately, the server appears to be down at the moment
> so I can't give you a link to the appropriate page.
>
> Also, I suspect the reason that you are seeing dates of '0000-00-00' is that
> you are supplying the dates in the wrong format within your INSERT
> statements and that MySQL is storing '0000-00-00' as the default. If you
> supply the dates in the format MySQL is expecting, you should get back the
> dates that you actually stored.
>
> Rhino
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.9.3 - Release Date: 05/04/2005
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to