Jump to content

Characters to date


moisesbr

Recommended Posts

Hi

 

 A date is expressed in character format as below:

 

$date_course = "22/08/2013" ;    # day/month/year

 

I am trying to insert it in mysql table using:

 

$date=date("Y-m-d",strtotime($date));

 

But I imagine is not enough and I have to convert it to "2012/08/22" before transforming it to date.

 

Please help me to clarify this issue and solve it.

 

Moises

 

 


 

Link to comment
https://forums.phpfreaks.com/topic/281193-characters-to-date/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.