MySQL Forums
Forum List  »  Newbie

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.

Options: ReplyQuote

Written By
Casting Varchar to a date
July 01, 2013 09:53PM

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.