Skip to content
Advertisement

Query database for last modified date

I am trying to query my WordPress server to echo the date of the last modified post.
In this case the database name is local and I am checking the posts table.

My current code is close to what I need, it will display the date and time as Y-m-d H:i (2021-01-13 12:18)

JavaScript

How do remove the time and display the date as d.n.Y?

Advertisement

Answer

You can use strtotime for that….

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