Page 1 of 1

date() + visible %

Posted: Fri Jul 15, 2005 9:34 pm
by imstupid
I've almost got this. It took me forever to rearrange the date from mysql in the format I wanted it to be displayed in. But now that I've got the correct format, the % signs are showing up.

Code: Select all

<?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>
Prints this: %07 %15 %2005

can I escape those bad boys some how?

thanks as usual.ange the date from mysql in the format I wanted it to be displayed in. But now that I've got the correct format, the % signs are showing up.

Code: Select all

<?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row&#1111;'edate'] = date(&quote;%m %d %Y&quo wanted it to be displayed in. But now that I've got the correct format, the % signs are showing up.

Code: Select all

<?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row&#1111;'edate'] = date(&quote;%m %d %Y", strtotime($row['edate'])) ;

echo $row['edthe correct format, the % signs are showing up.

Code: Select all

<?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y&qt now that I've got the correct format, the % signs are showing up.

Code: Select all

<?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>
Prints this: %07 %15 %2005

can I escape those bad boys some how?

thanks as usual.is. It took me forever to rearrange the date from mysql in the format I wanted it to be displayed in. But now that I've got the correct format, the % signs are showing up.

Code: Select all

<?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>
Prints this: %07 %15 %2005
is. It took me forever to rearrange the date from mysql in the format I wanted it to be displayed in. But now that I've got the correct format, the % signs are showing up.

Code: Select all

<?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>
Prints this: %07 %15 %2005

can I escape those bad boys some how?

thanks as usual.I wanted it to be displayed in. But now that I've got the correct format, the % signs are showing up.

Code: Select all

<?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>
Prints this: %07 %15 %2005

can I escape those bad boys some how?

thanks as usual.ayed in. But now that I've got the correct format, the % signs are showing up.

Code: Select all

<?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>
Pr date from mysql in the format I wanted it to be displayed in. But now that I've got the correct format, the % signs are showing up.

Code: Select all

<?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>
Prints this: %07 %15 %2005

can I escape those bad boys some how?

thanks as usual.fee]
<?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?&gt;


Prints mp;quote;, strtotime($row['edate'])) ;

echo $row['edate'];

?>


Prints this: %07 %15 %2005

can I escape those bad boys some how?

thanks as usual.e forever to rearrange the date from mysql in the format I wanted it to be displayed in. But now that I've got the correct format, the % signs are showing up.

Code: Select all

<?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>
Prints this: %07 %15 %2005

can I escape those bad boys some how?

thanks as usual.ere

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $rowї'edate'];

?&gt;


Prints this: %07 %15 %2005

can I escape those bad boys some hw['edate'])) ;

echo $row['edate'];

?>


Prints this: %07 %15 %2005

can I escape those bad boys some how?

thanks as usual.mp;lt;?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>


Prifetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>


Prints this: %07 %15 %2005

can I escape those bad boys some how?

thanks as usual.is. It took me forever to rearrange the date from mysql in the format I wanted it to be displayed in. But now that I've got the correct format, the % signs are showing up.

Code: Select all

<?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>
Prints this: %07 %15 %2005

can I escape those bad boys some how?

thanks as usual.];

?>


Prints this: %07 %15 %2005

can I escape those bad boys some how?

thanks as usual.rrange the date from mysql in the format I wanted it to be displayed in. But now that I've got the correct format, the % signs are showing up.

Code: Select all

<?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>
Prints this: %07 %15 %2005

Code: Select all

<?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>
Prints this: %07 %15 %2005

can I escape those bad boys some how?

thanks as usual.earrange the date from mysql in the format I wanted it to be displayed in. But now that I've got the correct format, the % signs are showing up.

Code: Select all

<?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>
Printcode here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>


Prints this: %07 %15 %2005

can I escape those bad boys some how?

thanks as usual.amp;lt;?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>


Prints this: %07 %15 %2005

can I escape those bad boysamp;gt;


Prints this: %07 %15 %2005

can I escape those bad boys some how?

thanks as usual. %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>


Prints this: %07 %15 %2005

can I escape those bad boys some how?

thanks as usual.displayed in. But now that I've got the correct format, the % signs are showing up.

Code: Select all

<?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>
Prints this: %07 %15 %2005

can I escape those bad boys some how?

thanks as usual.forever to rearrange the date from mysql in the format I wanted it to be displayed in. But now that I've got the correct format, the % signs are showing up.

Code: Select all

<?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>
Prints this: %07 %15 %2005

can I escape those bad boys some how?

thanks as usual.11;'edate'])) ;

echo $row['edate'];

?>


Prints this: %07 %15 %2005

can I escape those bad boys some how?

thanks as usual.is. It took me forever to rearrange the date from mysql in the format I wanted it to be displayed in. But now that I've got the correct format, the % signs are showing up.

Code: Select all

<?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>
Prints thi
<?PHP
// connect code here
// query code here

while($row = mysql_fetch_array( $result )) {

$row['edate'] = date("%m %d %Y", strtotime($row['edate'])) ;

echo $row['edate'];

?>


Prints this: %07 %15 %2005

can I escape those bad boys some how?

thanks as usual.

Posted: Fri Jul 15, 2005 9:45 pm
by timvw

Code: Select all

$row['edate'] = date("m d Y", strtotime($row['edate'])) ;
But i think you should change your query:

Code: Select all

$query = "SELECT DATE_FORMAT('%m %d %Y', edate) AS edate FROM table";
mp;quote;m d Y", strtotime($row['edate'])) ;


But i think you should change your query:

Code: Select all

$query = "SELECT DATE_FORMAT('%m %d %Y', edate) AS edate FROM table&quotw['edate'])) ;
But i think you should change your query:

Code: Select all

$query = "SELECT DATE_FORMAT('%m %d %Y', edate) AS edate FROM table";
ink you should change your query:

Code: Select all

$query = "SELECT DATE_FORMAT('%m %d %Y', edate) AS edate FROM table";
8c72578]

But i think you should change your query:

Code: Select all

$query = "SELECT DATE_FORMAT('%m %d %Y', edate) AS edate FROM table";
$row['edate'] = date("m d Y", strtotime($rowї'edate'])) ;


But i think you should change your query:

Code: Select all

$query = "SELECT DATE_FORMAT('%m %d %Y',
$row['edate'] = date("m d Y", strtotime($row['edate'])) ;
But i think you should change your query:

Code: Select all

$query = "SELECT DATE_FORMAT('%m %d %Y', edate) AS edate FROM table";
ow['edate'])) ;


But i think you should change your query:

Code: Select all

$query = "SELECT DATE_FORMAT('%m %d %Y', edate) AS edate FROM table";
But i think you should change your query:

Code: Select all

$query = "SELECT DATE_FORMAT('%m %d %Y', edate) AS edate FROM table";
;m d Y", strtotime($row['edate'])) ;


But i think you should change your query:

Code: Select all

$query = "SELECT DATE_FORMAT('%m %d %Y', edate) AS edate FROM table";
amp;quote;SELECT DATE_FORMAT('%m %d %Y', edate) AS edate FROM table";
'edate'] = date("m d Y", strtotime($row['edate'])) ;


But i think you should change your query:

Code: Select all

$query = "SELECT DATE_FORMAT('%m %d %Y', edate) AS edate FROM table";
table";
LECT DATE_FORMAT('%m %d %Y', edate) AS edate FROM table";
1]
$row['edate'] = date("m d Y", strtotime($row['edate'])) ;


But i think you should change your query:

Code: Select all

$query = "SELECT DATE_FORMAT('%m %d %Y', edate) AS edate FROM table";
"m d Y", strtotime($row['edate'])) ;


But i think you should change your query:

Code: Select all

$query = "SELECT DATE_FORMAT('%m %d %Y', e72578]
$query = "SELECT DATE_FORMAT('%m %d %Y', edate) AS edate FROM table";
e("m d Y", strtotime($row['edate'])) ;


But i think you should change your query:

Code: Select all

$query = "SELECT DATE_FORMAT('%m %d %Y', edate) AS edate FROM table";
%Y', edate) AS edate FROM table";
te;SELECT DATE_FORMAT('%m %d %Y', edate) AS edate FROM table";
) ;


But i think you should change your query:

Code: Select all

$query = "SELECT DATE_FORMAT('%m %d %Y', edate) AS edate FROM table";
date'] = date("m d Y", strtotime($row['edate'])) ;


But i think you should change your query:

Code: Select all

$query = "SELECT DATE_FORMAT('%m %d %Y', edate) AS edate FROM table";
$row['edate'] = date("m d Y", strtotime($row['edate'])) ;


But i think you should change your query:

Code: Select all

$query = "SELECT DATE_FORMAT('%m %d %Y', edate) AS edate FROM table";

Posted: Fri Jul 15, 2005 9:45 pm
by Burrito
the date function (in php) doesn't require the the % signs.

just use date("m/d/y") etc.

you might also be interested in a little function I wrote the other day:

viewtopic.php?t=35589

Posted: Fri Jul 15, 2005 9:46 pm
by Burrito
damn you tim...how did you edge me out of that one, I was typing as fast as I could...lol

Posted: Fri Jul 15, 2005 9:48 pm
by timvw
*poke* that's because you're getting old :)

Posted: Fri Jul 15, 2005 10:18 pm
by imstupid
thanks-
like usual, worked like a charm. I threw up a post in the "Theory and Design" forum since I'm struggling with the basics in case you guys get bored.