Originally posted by kiLLeR-eyEd_14
View Post
time and date function
Collapse
X
-
then add 1 day and 1day and 1 dayOriginally posted by morse View Posta predicting sunday, monday, tuesday etc for somebodys forthcomming birthday
Leave a comment:
-
a predicting sunday, monday, tuesday etc for somebodys forthcomming birthday
Leave a comment:
-
? Dnt get. Maybe if u say why, or what u want 2 use it 4. . .we wud.
Leave a comment:
-
maybe we both are not understanding each other, i can interpret what you meant by timestamp but it not an issue for me i just want
to work with my input variables, which for some unknown reason is not working and making me go nutsCode:[COLOR=#000000][COLOR=#0000bb]date[/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]"l"[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000bb]mktime[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]0[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000bb]0[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000bb]0[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000bb]7[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000bb]1[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000bb]2000[/COLOR][COLOR=#007700]))[/COLOR][/COLOR]
Leave a comment:
-
To undastand wot i sed earlyer i'l explain quickly d date function. It accepts 2 parameters.
First, the format string, this tells the date function how to format the date its bring. The second parameter, this specifies the time u want to format in UNIX timestamp (seconds since 1, jan 1970, i guess) if left blank, date() uses d current date time stamp aka time() bt if u already ava date u want to output, just specify it as d 2nd parameter(in timestamp).
U cud generate a timestamp urself.
Code:$daysago = 20; //replace wit watever $tmstmp = time() - ($daysago * 24 * 60 * 60); echo date("d m y",$tmstmp);
Leave a comment:
-
Php does has a functionality to echo day, date, month and year in a specific format if we provide the variables correctly, but for some reason am unable to echo proper results, i end up echoing Wednesday 31st december for all the different variable values. I did read the manual and they havent explained php date and time functions that very well.
Leave a comment:
-
dude, the date() works with unix time stamp. So if u want 2 echo a specific dat, u'd avta knw its correct timestamp in seconds and do sumot like:Originally posted by morse View PostThat would just echo current date, current month and current year bro, i want to echo a specific date, month and time whose values are there in the $a , $b and $c variables
echo date("d m y",$tmstamp);
NOTE: you can use strtotime() to convert string to time. Read php.net for more info. . .
Leave a comment:
-
2009-08-13T01:49:05+09:30,amPHP Code:$date = date("a");
$day = date("b");
$mounth = date("c");
echo "<p class=\"sub\">© $day,$mounth,$date $ctest</p>\n";
Leave a comment:
-
That would just echo current date, current month and current year bro, i want to echo a specific date, month and time whose values are there in the $a , $b and $c variables
Leave a comment:
-
PHP Code:$year = date("Y");
$day = date("D");
$mounth = date("M");
echo "$day,$mouth,$year";
$TimeZone="8"; ////Change the TimeZone accordingly!
$New_Time = time() + ($TimeZone * 60 * 60);
$show_time=date("H:i",$New_Time);
$Hour=date("G",$New_Time);
echo "<div>$show_time</div>";
Last edited by subzero; 12.08.09, 14:34.
Leave a comment:
-
Leave a comment: