Conver text to date in PHP

| No Comments | No TrackBacks

I have the text string as below:
04/02/08
It is text. Format is mm/dd/yy
But it is still can be recognized as yy/mm/dd or dd/mm/yy.

How to convert to the ISO date format?
I use PHP to do it.

date('Y-m-d',strtotime('04/02/08'))

It will convert the text to date and format it in ISO date.


Related Articles

No TrackBacks

TrackBack URL: http://www.yinfor.com/mtcgi/mt-t-1102.cgi/2024

Leave a comment

About this Entry

This page contains a single entry by David Yin published on January 11, 2008 2:54 PM.

Validation - jQuery Plugins was the previous entry in this blog.

PHP connect DBF file is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.21-en

Online Tools