Toggle navigation
Dashboard
Dashboard Tracker
Add / Edit My Forums
System Announcements
Discussion
Active Thread Feed
Top Threads Today
Top Threads This Week
Top Threads Library
Go!
View All
View All
Login
Logout
Home
Forums Index
Server Side
/
PHP Server Side Scripting
8:17 pm May 1, 2026
This page requires javascript.
Forum Moderators:
coopster
Message Too Old, No Replies
Need to Return today's date
want this form: 3/20/2003
briesm
Msg#:1267574
3:32 pm on Aug 2, 2005
(gmt 0)
so basically x/xx/2005
month/day/year
Angelis
Msg#:1267575
3:35 pm on Aug 2, 2005
(gmt 0)
<?php echo date("d-m-Y");?>
Angelis
Msg#:1267576
3:35 pm on Aug 2, 2005
(gmt 0)
Or swap the dates around I got it backward :)
dreamcatcher
Msg#:1267577
6:31 pm on Aug 2, 2005
(gmt 0)
Or with the slashes:
echo date("m/d/Y");
dc
coopster
Msg#:1267578
11:43 pm on Aug 2, 2005
(gmt 0)
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')
Join The Conversation
Register
For Free! -
Become a
Pro Member
!
See forum categories
-
Enter the Forum
Moderators and Top Contributors
Moderator List
| Top Contributors:
This Week
,
This Month
,
Apr
,
Mar
,
Archive
,
Top 100 All Time
,
Top Voted Members
Hot Threads This Week
April 2026 Google Search Observations
AdSense Earnings and Observations - April 2026
what do they want?
Hello again, it's been a while
I need some SEO help
SEO question
Do you get tired of others copying your content?
5 SEO Tips That Actually Worked for My Blog in 2026
Home
Forums Index
Server Side
/
PHP Server Side Scripting
8:17 pm May 1, 2026