Skip to content
Advertisement

Javascript getTime to php date

I have javascript that turns dates in my view to a time string using getTime(). That then is stored as a value for an option in my select form. Once it is passed to php, how do I turn that into a php date?

I have done:

JavaScript

Advertisement

Answer

You use PHP’s date() function:

JavaScript

Updated, thanks Yoshi.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement