Solved

digit gmt+ date

Posted on 2010-11-16
4
275 Views
Last Modified: 2012-08-14
I get date in this format

16.11.2010
13:53:40 GMT+01:00

want
2010-11-16
0
Comment
Question by:rgb192
  • 2
4 Comments
 
LVL 14

Accepted Solution

by:
ali_kayahan earned 250 total points
ID: 34149537
echo date("Y-m-d",strtotime("16.11.2010 13:53:40 GMT+01:00")) ;
0
 
LVL 109

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 total points
ID: 34149550
Same answer as the other:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_201-Handling-date-and-time-in-PHP-and-MySQL.html

date('Y-m-d') will format it correctly.  Not sure if strtotime() can handle that - you can test the strings on my web site here:
http://www.laprbass.com/RAY_strtotime.php
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 34149563
It tests OK with strtotime()
16.11.2010 13:53:40 GMT+01:00 WORKS WITH strtotime()
THE INTEGER TIMESTAMP VALUE IS 1,289,912,020
THE ISO8601 DATETIME STRING IS 2010-11-16T06:53:40-06:00
THE TEXTUAL DATE IS Tuesday 16th of November 2010 6:53:40 AM
0
 

Author Closing Comment

by:rgb192
ID: 34150011
$gmtp="16.11.2010 13:53:40 GMT+01:00";
echo date("Y-m-d",strtotime("$gmtp")) ;
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question