MySQL Forums
Forum List  »  Newbie

Re: str_to_date formula not working please help
Posted by: Annette Bithell
Date: August 24, 2011 11:57AM

Sorry, I tried the formula you put on the link you sent but changed the field to my string field.

I have just sent him a mail to recommend upgrading.

This is the query

select
date_add(
concat('20'
, substring_index(closedate,'/',-1)
, '-'
, substring_index(substring_index(closedate,'/',2),'/',-1)
, '-'
, substring_index(closedate,'/',1)
), interval 0 day) as mynewdate
from opencall

My field is a string but is formatted like this e.g. 18/08/2011 12:17:41

Options: ReplyQuote




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.