On 20 April 2010 17:40, Floyd Resler fres...@adex-intl.com wrote:
I need to get the difference in months between two dates. The dates could
be as much as 60 months apart. Is there any easy way to do this either
through PHP or MySQL? I know how I can do it through code but thought there
On Apr 21, 2010, at 5:39 AM, Michiel Sikma wrote:
On 20 April 2010 17:40, Floyd Resler fres...@adex-intl.com wrote:
I need to get the difference in months between two dates. The dates could
be as much as 60 months apart. Is there any easy way to do this either
through PHP or MySQL? I
I need to get the difference in months between two dates. The dates could be
as much as 60 months apart. Is there any easy way to do this either through
PHP or MySQL? I know how I can do it through code but thought there might be a
simple one or two line option.
Thanks!
Floyd
--
PHP
On Tue, Apr 20, 2010 at 11:40 AM, Floyd Resler fres...@adex-intl.comwrote:
I need to get the difference in months between two dates. The dates could
be as much as 60 months apart. Is there any easy way to do this either
through PHP or MySQL? I know how I can do it through code but thought
At 11:40 AM -0400 4/20/10, Floyd Resler wrote:
I need to get the difference in months between two dates. The dates
could be as much as 60 months apart. Is there any easy way to do
this either through PHP or MySQL? I know how I can do it through
code but thought there might be a simple one
On Tue, Apr 20, 2010 at 03:32:58PM -0400, tedd wrote:
At 11:40 AM -0400 4/20/10, Floyd Resler wrote:
I need to get the difference in months between two dates. The dates
could be as much as 60 months apart. Is there any easy way to do
this either through PHP or MySQL? I know how I can do it
On Sun, March 23, 2008 11:17 pm, Ron Piggott wrote:
I have this math equation this list helped me generate a few weeks
ago.
The purpose is to calculate how many days have passed between 2 dates.
Right now my output ($difference) is 93.958333 days.
I am finding this a little weird. Does
Could someone then help me modify the PHP script so I won't have this
timezone issue? I don't understand from looking at the date page on the
PHP web site the change(s) I need to make. Thanks, Ron
?
$date1 = strtotime($date1);
$date2 = strtotime($date2);
$factor = 86400;
$difference =
(top-posting!)
Add either the round function or ceil function.
On Mar 25, 2008, at 6:47 AM, Ron Piggott [EMAIL PROTECTED]
wrote:
Could someone then help me modify the PHP script so I won't have this
timezone issue? I don't understand from looking at the date page on
the
PHP web site
Ron Piggott wrote:
I have this math equation this list helped me generate a few weeks ago.
The purpose is to calculate how many days have passed between 2 dates.
Right now my output ($difference) is 93.958333 days.
I am finding this a little weird. Does anyone see anything wrong with
I have this math equation this list helped me generate a few weeks ago.
The purpose is to calculate how many days have passed between 2 dates.
Right now my output ($difference) is 93.958333 days.
I am finding this a little weird. Does anyone see anything wrong with
the way this is
On 24/03/2008, at 5:17, Ron Piggott wrote:
I have this math equation this list helped me generate a few weeks
ago.
The purpose is to calculate how many days have passed between 2 dates.
Right now my output ($difference) is 93.958333 days.
I am finding this a little weird. Does anyone
On Sun, Mar 23, 2008 at 9:17 PM, Ron Piggott [EMAIL PROTECTED] wrote:
I have this math equation this list helped me generate a few weeks ago.
The purpose is to calculate how many days have passed between 2 dates.
snip
$date1 = strtotime($date1); (March 21st 2008)
$date2 =
This leads me to another question. If I have stored the date as an
epoch then is there a way using PHP and MySQL to say find all the
records that have been added this YEAR (not last 365 days)?
SELECT * FROM table WHERE YEAR(FROM_UNIXTIME(column)) =
YEAR(CUR_DATE());
Benchmark each method and
I am storing my dates as unix timestamp (epoch). Am I right in assuming
that if I need to add or subtract days from this it is done in seconds?
So for example if I have the timestamp 1041397200 and I wanted to
subtract 24 hours from it I would do this:
$newtime = $orig_time - 86400;
Thanks,
On March 27, 2003 09:15 pm, Charles Kline wrote:
I am storing my dates as unix timestamp (epoch). Am I right in
assuming that if I need to add or subtract days from this it is
done in seconds?
yes
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
I think there's problems doing that when daylight savings starts/ends
Just something to keep in mind...
-Original Message-
From: Leo Spalteholz [mailto:[EMAIL PROTECTED]
Sent: Friday, March 28, 2003 4:32 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] date math question
On March 27, 2003 09
Okay cool.
This leads me to another question. If I have stored the date as an
epoch then is there a way using PHP and MySQL to say find all the
records that have been added this YEAR (not last 365 days)?
Thanks
Charles
On Friday, March 28, 2003, at 12:31 AM, Leo Spalteholz wrote:
On March 27,
hi,
$start = mktime ( 0, 0, 0, 1, 1, date['Y']); // first day of this year
$end = mktime ( 0, 0, 0, 12, 31, date['Y']); // last day of this year
then select all record where timestamp = $start and timestamp = $end
should do the job
Hope this helps
Foong
Charles Kline [EMAIL PROTECTED]
sorry
typo error should be:
date('Y')
Foong
Foong [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
hi,
$start = mktime ( 0, 0, 0, 1, 1, date['Y']); // first day of this year
$end = mktime ( 0, 0, 0, 12, 31, date['Y']); // last day of this year
then select all record where
Caught that :) Thanks for the tip... worked just perfect (after I fixed
typo)
On Friday, March 28, 2003, at 12:57 AM, Foong wrote:
sorry
typo error should be:
date('Y')
Foong
Foong [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
hi,
$start = mktime ( 0, 0, 0, 1, 1, date['Y']); //
21 matches
Mail list logo