dates timestamp problems when converting

2

I have stored the "dates" (it is a varchar) and I need to take it to another format to do operations, and many poor options and the one that seemed to help me dateformat arrogates values to me in zeros, I also have to keep the hours and minutes , the system is going to be in php, in another php I use dates the strtotime worked, I imagine that / I will have to replace them with "-"

attached images of the base, what I have to do is move from date to new date

    
asked by sanlegas 19.04.2018 в 18:35
source

1 answer

2

You can try the following function:

SELECT STR_TO_DATE("19/04/2018 18:30:01", '%d/%m/%Y %H:%i:%s')

Get a string field and return its corresponding date field. You can check the documentation of this function in the following link .

    
answered by 19.04.2018 / 18:55
source