Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 25 Sep 2008, 15:49
vb_mp vb_mp is offline
 
Join Date: Feb 2008
How To Calculate Difference In Dates Between Join Date and Current Date

Hi,

I am not sure how I can calculate the difference between current date and join date in a template

Something like:

<if condition="$post['joindate'] AND $currentdate AND Days($currentdate) - Days($post['joindate']) > 30)">
Do something
</if>

Anyone?
Reply With Quote
  #2  
Old 25 Sep 2008, 16:08
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
I don't think you can do it in the template because the dates are already made to 'look nice'. You can do it in the php code before the dates are reformatted for output though (when it is still in it's unix timecode format).
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 04:52.

Layout Options | Width: Wide Color: