J
J
Junior2019-02-11 16:44:56
PHP
Junior, 2019-02-11 16:44:56

How to make a date from a string?

How to make a date from this string?
$date='12:30'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Never Ever, 2019-02-11
@IT-Programmer

try this
$date = '2019-01-10 12:30';
echo date("Ymd H:i", strtotime($date));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question