Solved

digit gmt+ date

Posted on 2010-11-16
4
280 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 110

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 110

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

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

635 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