i am reciving this format of date :
16.05.04
(dd.mm.yy)
and i want to convert it into mysql date type
how do i do that?
htnaks in advance
Peleg
convert into a mysql dae format
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
$inDate = "16.05.04";
$bits = explode(".",$inDate);
$timestamp = mktime(0,0,0,$bits[1],$bits[0],$bits[2]);
$date = date("Y-m-d",$timestamp);-
leenoble_uk
- Forum Contributor
- Posts: 108
- Joined: Fri May 03, 2002 10:33 am
- Location: Cheshire
- Contact:
You can put the timestamp straight into mysql:
Code: Select all
SET time_holding_column = UNIX_TIMESTAMP('$timestamp');