|
-
Apr 21st, 2003, 05:05 PM
#1
Thread Starter
New Member
date
how can i get date of last tuesday?
how can ig et the date of the 5th of month?
how can i get the date of first fridya?
thansk
-
Apr 21st, 2003, 05:10 PM
#2
Frenzied Member
how can you not learning anythign if you don't read the manual
look up strtotime();
-
Apr 21st, 2003, 05:11 PM
#3
Stuck in the 80s
Re: date
Originally posted by php_n00b
how can i get date of last tuesday?
Use the strtotime() function:
Code:
<?php
echo "Last Tuesday: " . date('m-d-Y', strtotime("last tuesday"));
?>
Originally posted by php_n00b
how can ig et the date of the 5th of month?
Huh?
Code:
<?php
echo "Fifth of the month: " . date('m-d-Y', strtotime("04-05-03"));
?>
Originally posted by php_n00b
how can i get the date of first fridya?
Again, strtotime():
Code:
<?php
echo "First Friday: " . date('m-d-Y', strtotime("first friday"));
?>
Originally posted by php_n00b
thansk
I suggest you go to these sites and read them:
http://www.php.net/manual/en/function.date.php
http://www.php.net/manual/en/function.strtotime.php
If English isn't your native language, which I suspect it isn't, they have the manual available in a wide variety of tongues.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|