Conver text to date in PHP

| No Comments

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.



Leave a comment

About Me

As a tech geek and life geek, I always like to share my experience to you, my readers.

David Yin

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.

Archives

Subscribe

Ads