Regex filter needed for date

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
ViserExcizer
Forum Newbie
Posts: 24
Joined: Tue Nov 25, 2008 1:17 pm

Regex filter needed for date

Post by ViserExcizer »

January 1, 2008

June 25, 2009 - 8:24 am

I need to break down the first date into 3 arrays, Month, Date, year.
And the second one the same, and the time could be ignored.
The data fetched from the database is varchar, and I need a preg_match fucntion to do this. Thanks alot. Im a newbie.
danielrs1
Forum Commoner
Posts: 29
Joined: Wed Jun 24, 2009 5:30 pm

Re: Regex filter needed for date

Post by danielrs1 »

You can try the function strtotime()
Post Reply