Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Is it possible to convert date to timestamp ?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
ALLINAPPLI
Smarty n00b


Joined: 01 Mar 2022
Posts: 1

PostPosted: Tue Mar 01, 2022 3:35 pm    Post subject: Is it possible to convert date to timestamp ? Reply with quote

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
View user's profile Send private message
bsmither
Smarty Elite


Joined: 20 Dec 2011
Posts: 322
Location: West Coast

PostPosted: Wed Mar 02, 2022 2:12 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP