Hi,
I am using CC for filtering the table on dropdown change.
In body section I have the coding like this
I would like to add the functionaliy of "DATE_FORMAT( value , '%Y/%m/%d') "
can you help me how can I apply this funtion on the {Expected_Start_Date}
Regards,
Shoaib
I am using CC for filtering the table on dropdown change.
In body section I have the coding like this
<table style="text-align: left; width: 99%;" border="1" >
<tr<?php if ($i % 2) echo ' style="background-color: #EBEBEB;"';?>>
<td style="width: 20%;"><a href=index.php?option=com_chronocontact&chronoformname=studycenter_linkpage&v_name={fabrik_internal_id}>{Project_Name}</a></td>
<td style="width: 20%;">{Village}</td>
<td style="width: 20%;">{Estimated_Cost_Rs}</td>
<td style="width: 20%;">{Expected_Start_Date}</td>
<td style="width: 20%;">{Expected_Complete_Date}</td>
</tr>
</table>
<?php $i++ ?>
I would like to add the functionaliy of "DATE_FORMAT( value , '%Y/%m/%d') "
can you help me how can I apply this funtion on the {Expected_Start_Date}
Regards,
Shoaib
Hi shoaib,
You need to add a little PHP to format the date in the Body section. What the code needs to be depends on what is being returned from the database query. In general you can access a varible with $MyRow->variable_name
Bob
PS You will usually get better page layout by putting the <table> andd </table> tags in the Header & Footer boxes rather than the Body box.
You need to add a little PHP to format the date in the Body section. What the code needs to be depends on what is being returned from the database query. In general you can access a varible with $MyRow->variable_name
Bob
PS You will usually get better page layout by putting the <table> andd </table> tags in the Header & Footer boxes rather than the Body box.
Hi,
As you said I used php header some thing like this
But Here I get all the values like this "1969/12/31". For all the data I get the contans value "1969/12/31".
Example:
If the Date is "2010-08-02 00:00:00" I get the result "1969/12/31".
Regards,
Shoaib.
As you said I used php header some thing like this
<td style="width: 20%;"><?php $pre = strtotime('Expected_Start_Date');
echo date('Y/m/d',$pre); ?></td>
But Here I get all the values like this "1969/12/31". For all the data I get the contans value "1969/12/31".
Example:
If the Date is "2010-08-02 00:00:00" I get the result "1969/12/31".
Regards,
Shoaib.
Hi Shoaib,
I'm pretty certain that isn't anything I said. 'Expected_Start_Date' is a string and can't be converted to a date - so the result you get is the PHP equivalent of '00/00/0000'
Try with $MyRow->Expected_Start_Date but you really need some PHP help here.
Bob
I'm pretty certain that isn't anything I said. 'Expected_Start_Date' is a string and can't be converted to a date - so the result you get is the PHP equivalent of '00/00/0000'
Try with $MyRow->Expected_Start_Date but you really need some PHP help here.
Bob
This topic is locked and no more replies can be posted.