Webmastersite.net
Register Log In

Question About Custom Date Formats

Comments on Question About Custom Date Formats

eeyipes
Member

Usergroup: Customer
Joined: Nov 12, 2004

Total Topics: 9
Total Comments: 20
eeyipes
Question About Custom Date Formats
Posted Mar 23, 2013 - 10:22 AM:

Let's say I wanted to display a date that was 1 day earlier than the LINKEXPIRE date. So if a link expires 3/31/13, it would display a date of 3/30/13. Is there a way to use custom date format with LINKEXPIRE to do this?

Thanks!
webflair
Forum Regular

Usergroup: Customer
Joined: Nov 27, 2006

Total Topics: 187
Total Comments: 465
Posted Mar 24, 2013 - 9:06 PM:

Try...

 <?php  $date = "{LINKEXPIREDATE}";
 $daybefore = strtotime ( '-1 day' , strtotime ( $date ) ) ; $daybefore = date ( 'm/j/Y' , $daybefore );
 echo $daybefore;   ?>
 
eeyipes
Member

Usergroup: Customer
Joined: Nov 12, 2004

Total Topics: 9
Total Comments: 20
eeyipes
Posted Apr 20, 2013 - 10:51 PM:

That worked perfect. Thanks!
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.