View Full Version : Convert Dec-03-03 to 12/3/2003 ?
12-09-2003, 02:44 AM
I am trying to figure out how to convert the following date format:
Any native php functions to do this? I couldn't find anything.
Php only, not MySQL.
12-09-2003, 06:38 AM
Ok you will have to slightly change the form of your date but there is a function that can do it.
strtotime() can convert english dates into a timestamp then from there you can use date() to format it to your choice.
echo date ("m/d/Y",strtotime ("Dec 03 03"));
(notice the removal of the -
but if you are stuck with that format you can always remove the dash before processing
12-10-2003, 04:39 AM
thanks very much, I'll try that
12-10-2003, 05:07 AM
You rock! thanks. WOrked great.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.