Forum Moderators: coopster

Message Too Old, No Replies

Need to Return today's date

want this form: 3/20/2003

         

briesm

3:32 pm on Aug 2, 2005 (gmt 0)

10+ Year Member



so basically x/xx/2005
month/day/year

Angelis

3:35 pm on Aug 2, 2005 (gmt 0)

10+ Year Member



<?php echo date("d-m-Y");?>

Angelis

3:35 pm on Aug 2, 2005 (gmt 0)

10+ Year Member



Or swap the dates around I got it backward :)

dreamcatcher

6:31 pm on Aug 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Or with the slashes:

echo date("m/d/Y");

dc

coopster

11:43 pm on Aug 2, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



If you truly want the numeric representation of a month, without leading zeros (for example, 1 through 12), then you need to use "n" ...
// Format: 8/02/2005 
date [php.net]('n/d/Y')