Re: Date Problem

From: Date: Thu, 21 Jun 2012 11:18:46 +0000
Subject: Re: Date Problem
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-30920@lists.php.net to get a copy of this message
While this might not be perfect/exact information, here's a link to the w3schools.com date/time functions reference page, and, off-hand, you could convert a date string into a timestamp, and then just add, or subtract the relevant timestamp amount from it, using the sort of formula that a timestamp is measured in seconds, and thus, for example, 1 day = 60 * 60 * 24 seconds to be added or subtracted from the result of the mktime, or strtotime functions executed on the date formatted string, if that's what you have to work with/on: http://www.w3schools.com/php/php_ref_date.asp Stay well Jacob Kruger Blind Biker Skype: BlindZA '...fate had broken his body, but not his spirit...' ----- Original Message ----- From: "Vinay Kannan" <vinykan@gmail.com> To: <php-windows@lists.php.net>; <phpexperts@yahoogroups.com>; "php mysql" <PHP_MySQL_usergroup@yahoogroups.com> Sent: Thursday, June 21, 2012 8:27 AM Subject: [PHP-WIN] Date Problem
Hey Guys, I am working on a project for a client who is a retailer of inverters and batteries, and currently the system records the salesdetails including the warranty expiry date which is always a year(12 months). But he wishes to provide support and service every 3 months and that seems to be the beginning of my problems :D if the warranty on billno ='100' expires on 2012-09-27, the system has to show him this billno 4 times as a service due. Eg: a product was sold and a bill generated on 2011-9-27, the warranty on the products expires on 2012-9-27, so the system has to show the first service due on 2011-12-27, then one on 2012-3-27, then on 2012-6-27. How do i go about it? Any help is much appreciated. Thanks,


« previous php.windows (#30920) next »