Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
>
Web Programming
>
PHP Development
Date variable?
User Name
Remember Me?
Password
Register
FAQ
Search
Latest Posts
Mark Forums Read
LinkBack
Thread Tools
Search this Thread
Display Modes
12-01-2005, 09:08 PM
#
1
(
permalink
)
thejunior
Junior Member
Join Date: Jul 2005
Posts: 24
Date variable?
Is there a php variable which holds the current date?
thejunior
View Public Profile
Send a private message to thejunior
Find More Posts by thejunior
Sponsored Links
12-02-2005, 11:51 AM
#
2
(
permalink
)
cristobal
Senior Member
Join Date: Sep 2005
Posts: 219
date?
[quote] print "`date '+%Y-%m-%d'";[quote]
Try that out
__________________
Check for broken links on your website
cristobal
View Public Profile
Send a private message to cristobal
Find More Posts by cristobal
12-03-2005, 05:38 AM
#
3
(
permalink
)
boohlick
Webmaster Guru
Join Date: Aug 2005
Posts: 401
or you can try this
Quote:
<?php
// set the default timezone to use. Available since PHP 5.1
date_default_timezone_set('UTC');
// Prints something like: Monday
echo date("l");
// Prints something like: Monday 15th of August 2005 03:12:46 PM
echo date('l dS \of F Y h:i:s A');
// Prints: July 1, 2000 is on a Saturday
echo "July 1, 2000 is on a " . date("l", mktime(0, 0, 0, 7, 1, 2000));
/* use the constants in the format parameter */
// prints something like: Mon, 15 Aug 2005 15:12:46 UTC
echo date(date::RFC822);
// prints something like: 2000-07-01T00:00:00+0000
echo date(date::ATOM, mktime(0, 0, 0, 7, 1, 2000));
?>
__________________
Australian Immigration
|
Australian Visa
|
Immigration to Australia
Australian Job Search Listing
boohlick
View Public Profile
Send a private message to boohlick
Find More Posts by boohlick
12-03-2005, 09:52 PM
#
4
(
permalink
)
clifford
Junior Member
Join Date: Jun 2005
Location: Finland
Posts: 26
time() is a function holding the current unix timestamp, and date() is a function used to format that value.
clifford
View Public Profile
Send a private message to clifford
Find More Posts by clifford
«
Previous Thread
|
Next Thread
»
Thread Tools
Search this Thread
Show Printable Version
Email this Page
Search this Thread
:
Advanced Search
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
Posting Rules
You
may not
post new threads
You
may not
post replies
You
may not
post attachments
You
may not
edit your posts
vB code
is
On
Smilies
are
On
[IMG]
code is
On
HTML code is
Off
Trackbacks
are
On
Pingbacks
are
On
Refbacks
are
On
Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00
» Sponsors
» Links
» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers
» Links
» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum
All times are GMT -4. The time now is
06:58 PM
.
Contact Us
-
WebMaster Forums
-
Archive
-
Privacy Statement
-
Top
LinkBacks Enabled by
vBSEO
3.0.0 RC8
Webmaster Forums
LinkBack
LinkBack URL
About LinkBacks