views:

27

answers:

2

Hi all

I can't just make this work.

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

Regards

Matt

+4  A: 

Try

echo date('YmdHis');
Atli
+2  A: 

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.

Dominic Rodger