Solved

digit gmt+ date

Posted on 2010-11-16
4
278 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

752 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