Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

digit gmt+ date

Posted on 2010-11-16
4
Medium Priority
?
282 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 1000 total points
ID: 34149537
echo date("Y-m-d",strtotime("16.11.2010 13:53:40 GMT+01:00")) ;
0
 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 1000 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 111

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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
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.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

877 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