|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
ALLINAPPLI Smarty n00b
Joined: 01 Mar 2022 Posts: 1
|
Posted: Tue Mar 01, 2022 3:35 pm Post subject: Is it possible to convert date to timestamp ? |
|
|
what is the smarty syntax to convert a date into timestamp (other way round is easy)? If I write {capture assign=end_date}{latestcurrentmembership.end_date}{/capture}{$fin = $end_date|strtotime} I'm getting nothing. |
|
Back to top |
|
bsmither Smarty Elite
Joined: 20 Dec 2011 Posts: 322 Location: West Coast
|
Posted: Wed Mar 02, 2022 2:12 am Post subject: |
|
|
You are making an assignment to $fin. Are you then asking Smarty to display the value of $fin?
The missing statement Code: | {$fin|default:'Huh?'} | may be what you want. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|