J
J
javadoffuad2014-03-26 17:07:43
PHP
javadoffuad, 2014-03-26 17:07:43

How to convert date(ymd) to time()?

Hey guys, I need to make date("d-m-Y")an envelope in time(). Maybe someone faced a similar task...
Thanks in advance
For example:

$date = "24/03/2014"; 
// $date конвентировать unix time

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Khirenko, 2014-03-26
@javadoffuad

stackoverflow.com/questions/1670797/convert-date-t...

M
Melkij, 2014-03-26
@melkij

And if you don’t go back to the last century with all sorts of mktime and other unreadable charms, then take a long time already regular class for working with datetime: www.php.net/manual/en/datetime.createfromformat.php

R
Roman Sokharev, 2014-03-26
@greabock

first split the string using explode() ,
then substitute the values ​​into mktime()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question