MySQL Forums :: Newbie :: Casting Varchar to a date


Advanced Search

Casting Varchar to a date
Posted by: Bradley Kjeldsen ()
Date: July 01, 2013 09:53PM

Hi there,

I am using MYSQL & PHPAdmin

I have a column called dispatchdate which is being stores as VARCHAR(255).
It is storing dates though as '12/06/2013' format. (DD/MM/YYYY)

I want to be able to in my PHP to display only the dates for the current month.

Can anyone please help with this?

I am assuming I need to use a CAST function, but i've tried different formats and MYSQL gives me an error.

Would appreciate any help.
Thanks.

Options: ReplyQuote


Subject Written By Posted
Casting Varchar to a date Bradley Kjeldsen 07/01/2013 09:53PM
Re: Casting Varchar to a date Barry Galbraith 07/01/2013 10:04PM
Re: Casting Varchar to a date Bradley Kjeldsen 07/01/2013 10:12PM
Re: Casting Varchar to a date Barry Galbraith 07/01/2013 11:35PM
Re: Casting Varchar to a date Bradley Kjeldsen 07/02/2013 12:14AM
Re: Casting Varchar to a date Barry Galbraith 07/02/2013 01:37AM
Re: Casting Varchar to a date Phillip Ward 07/02/2013 05:19AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.