im sure this is easy but i just haven't found right way to convert
30-aug-2004
into
2004-08-30
using a php function (no mySQL)
can somebody help me out.
peace!
$st = "30-aug-2004"; $new = date("Y-m-d", strtotime($st));
thanks! (again!)
nice avatar
actually, i now realise it's not quite working.
example:
$today="01-nov-2004"; $st = $today; $thedate = date("Y-m-d", strtotime($st));
returns $thedate=2003-11-12
instead of 2003-11-01
This worked for me. Look at your code again
$st = "01-nov-2004"; $new = date("Y-m-d", strtotime($st));
thanks. i figured it out. i was running it before my split() to break apart the lines i'm processing. i moved it to after and of course then it started working.
thanks again for your great help!