View Single Post
  #1  
Old 08-13-2006, 07:45 AM
krispy krispy is offline
Junior Member
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
krispy is on a distinguished road
Default date reformatting

I am trying to convert a date that I take from an email. It is in this format:

Wed, 02 Aug 2006 03:59:10 -0700

And I want to convert it to:

2006-08-02

This:
trim(substr($date,12,4))."-".trim(substr($date,8,3))."-".trim(substr($date,5,2))

...will get me:

2006-Aug-02.

Any quick php tips to convert the "Aug" to convert to "08"?

Thanks! -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  Webmaster Forums - View Single Post - date reformatting
View Single Post
  #1  
Old 08-13-2006, 07:45 AM
krispy krispy is offline
Junior Member
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
krispy is on a distinguished road
Default date reformatting

I am trying to convert a date that I take from an email. It is in this format:

Wed, 02 Aug 2006 03:59:10 -0700

And I want to convert it to:

2006-08-02

This:
trim(substr($date,12,4))."-".trim(substr($date,8,3))."-".trim(substr($date,5,2))

...will get me:

2006-Aug-02.

Any quick php tips to convert the "Aug" to convert to "08"?

Thanks! -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote