Formatting date

La Larion476 18 Jul, 2011
I have a form with a DATETIME field, I am trying to extract the date, in the body section I put
<td><?php echo substr({evdate},0,10); ?></td>


I get this message:
Parse error: syntax error, unexpected '{', expecting ')' in /home/hilair/public_html/chef/components/com_chronoconnectivity/libraries/connection.php(303) : eval()'d code on line 4.

What am I doing wrong?
Gr GreyHead 18 Jul, 2011
Hi Larion476,

You can use the {input_name} syntax in PHP. Use $MyRow->input_name instead.
<td><?php echo substr($MyRow->evdate, 0, 10); ?></td>

Bob
wa wanacom 20 Jul, 2011
Hello

Can you tell me how I can have the variable $MyRow ?

Thanks

++ Gilles
Gr GreyHead 20 Jul, 2011
Hi Gilles,

Sorry, I don't understand your question? ChronoForms creates $MyRow for you.

Bob
This topic is locked and no more replies can be posted.