I'm having a problem with a MySQL query for returning the "last visit" field in a table.
Originally I had:
select fname, lname, last_visit from patient where isactive = 1 and uid = 1
Which worked perfectly in MySQL, but as soon as the query is executed by my ASP.NET app, it adds in the time field also to the date area. So 2011-12-12 becomes 12/12/2011 12:00:00 AM
I tried this also, with no improvement:
select fname, lname, DATE(last_visit) as last_visit from patient where isactive = 1 and uid = 1 order by lname
How can I fix this?