InterWebUK Posted November 17, 2008 Share Posted November 17, 2008 Does anyone know the smarty code for displaying date in this format: Monday 17 November, 2008 the php code does not work in header template file: <?php echo date("d-m-Y h:i:sa", time()); ?> Any ideas? Thanks John 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted November 17, 2008 Share Posted November 17, 2008 http://smarty.net/manual/en/language.modifier.date.format.php 0 Quote Link to comment Share on other sites More sharing options...
InterWebUK Posted November 17, 2008 Author Share Posted November 17, 2008 Hi sparky, thank I have looked at that and added {$yesterday|date_format:"%A, %B %e, %Y"} instead of the php code and it still shows nothing, is that the right code? Thanks John 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted November 17, 2008 Share Posted November 17, 2008 $yesterday variable is not defined {$smarty.now|date_format:"%A, %e %B, %Y"} 0 Quote Link to comment Share on other sites More sharing options...
InterWebUK Posted November 17, 2008 Author Share Posted November 17, 2008 Thanks Sparky, thats got it to display, just got to get it to display in the correct colour now 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted November 17, 2008 Share Posted November 17, 2008 <div style="color:pink;">{$smarty.now|date_format:"%A, %e %B, %Y"}</div> 0 Quote Link to comment Share on other sites More sharing options...
InterWebUK Posted November 17, 2008 Author Share Posted November 17, 2008 Thanks sparky, I already now how to do that, thanks, it was just the smarty issue. 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted November 17, 2008 Share Posted November 17, 2008 No Probs... just playing around RE: your first post the php bit as below {php} echo date("d-m-Y h:i:sa", time()); {/php} 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.