Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

date to unix_timestamp

Posted on 2014-02-14
4
Medium Priority
?
164 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 668 total points
ID: 39860713
print strtotime('4/21/2012 12:18:56')
0
 
LVL 27

Assisted Solution

by:Cornelia Yoder
Cornelia Yoder earned 668 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 111

Assisted Solution

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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 count occurrences of each item in an array.

705 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