0

I can't just make this work.

How can i display the current date in PHP in the format YYYYMMDDHHMMSS.

Regards

Matt

2 Answers 2

4

Try

echo date('YmdHis'); 
Sign up to request clarification or add additional context in comments.

Comments

3

Use date:

echo date("YmdHis"); 

That'll display the current date in the format you asked for in the timezone of whatever machine PHP is running on.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.