Solved

date to unix_timestamp

Posted on 2014-02-14
4
163 Views
Last Modified: 2014-02-16
4/21/2012 12:18:56 AM

times in this format

how do I translate to unix_timestamp
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
4 Comments
 
LVL 29

Accepted Solution

by:
becraig earned 167 total points
ID: 39860713
print strtotime('4/21/2012 12:18:56')
0
 
LVL 27

Assisted Solution

by:Cornelia Yoder
Cornelia Yoder earned 167 total points
ID: 39860721
strtotime() will convert any date to a unix timestamp.  The function documentation can be found at  

http://us3.php.net/manual/en/function.strtotime.php
0
 
LVL 110

Assisted Solution

by:Ray Paseur
Ray Paseur earned 166 total points
ID: 39861106
Please, please, please read this article (I'm sure we have talked about this before).  It will answer almost all of your questions about handling dates and times in PHP.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_201-Handling-date-and-time-in-PHP-and-MySQL.html

One of the things you want to be careful about... Dates written with dashes separating the month, day and year may be interpreted differently from dates written with slashes.  You might want to set up some test cases so you can see the difference.
0
 

Author Closing Comment

by:rgb192
ID: 39863599
strtotime thanks
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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 …

636 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