Project / Support Center
Welcome, Guest. Please login or register. July 04, 2022, 01:10: PM
Home Help Search Login Register
D-Web Web Site Creator D - Web Web Site Creator On-line HTML Editor No Programming knowledge required. Web Global Net PayPal-Cart Shopping Cart System PayPal - Kart Shopping Cart System for E-Commerce over the internet, that's easy to use. Web Global Net Newsletter Manager Newsletter Manager On-line Newsletter Creator with Email Subscriber Management.
Ring Central Discount
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  MySQL/PHP  |  Topic: Calculating # of days after or between a transaction date (timestamp) 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Send this topic Print
Author Topic: Calculating # of days after or between a transaction date (timestamp)  (Read 6763 times)
admin
Administrator
******
Offline Offline

Posts: 234


« on: November 17, 2014, 05:01: PM »

<?php   
$now = time(); // or your date as well
$your_date = strtotime(@$row_rsecho['transaction_date']);  // dynamic recordset date
$datediff = $now - $your_date;
$days= ($datediff / (60 * 60 * 24))
   ?>

Show if based on # of days less than
 <?php
// Show IF Conditional region for 60 days
if($days >
 60) {
?>
Your text or image that will show if greater than 60 days past start date
?> // end show if

Show if based on # of days less than
 <?php
// Show IF Conditional region for 180 days or 6 months
if($days <
 180) {
?>
Your text or image that will show if less than 180 days past start date
?> // end show if
« Last Edit: September 28, 2020, 07:15: PM by admin » Report to moderator   Logged

The Unknown Webmaster
Pages: [1] Go Up Send this topic Print 
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  MySQL/PHP  |  Topic: Calculating # of days after or between a transaction date (timestamp) « previous next »
Jump to:  


Login with username, password and session length
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!