Manojkumar
Manojkumar

Reputation: 1361

How to convert dates of this kind to month-day-year format?

I have to convert the following date format to m-d-Y format. How can I achieve it? $date='Thu, 20 Jun 2013 09:09:52 UTC' and what I am suppose to pass in query is 6-20-2013

Please let me know a few quick tricks.

Thanks

Upvotes: 0

Views: 98

Answers (1)

Pradeep Sathyaraj
Pradeep Sathyaraj

Reputation: 134

date('m-d-Y', strtotime('Thu, 20 Jun 2013 09:09:52 UTC'))

Upvotes: 1

Related Questions