Paul Nowosielski wrote:
Dear All,
I was wondering if there are any major date function changes between php4 and
5.
I don't think so but check the docs:
http://www.php.net/manual/en/faq.migration5.php
When I say date function I mean mktime() , date() ,strtotime() etc.
Here is my dilemma,
:18 PM
To: Paul Nowosielski
Cc: php-general@lists.php.net
Subject: Re: [PHP] Date functions differences between php 4 and 5
Paul Nowosielski wrote:
Dear All,
I was wondering if there are any major date function
changes between php4 and
5.
I don't think so but check the docs
snip
You might already be fed up with my posts but I'm a complete PHP newbie
and find these groups are the best way to learn! Anyway I have the
database date in the format: -mm-dd hh:mm:ss e.g. 2004-02-24
07:57:59 but when in some situations I only want to show the user the
date in the format
Depending on your database engine (which you didn't mention in your
post), some allow you to format the date however you want it as you pull
it out of the database in your sql query. I always find this to be the
easiest way to do it. That way you don't have to worry about formatting
the data
On Tue, 2004-02-24 at 13:29, Matthew Oatham wrote:
You might already be fed up with my posts but I'm a complete PHP
newbie and find these groups are the best way to learn! Anyway I have
the database date in the format: -mm-dd hh:mm:ss e.g. 2004-02-24
07:57:59 but when in some situations I
Patrick
Off the top of my head... Convert both date1 and date2 to unix timestamps,
and subtract one from the other. That will give you the number of seconds
between them. Then, convert to hours, minutes, etc as required.
Peter
At 10:38 PM 9/23/2002 +0200, Patrick wrote:
i got 2 dates and
Well you could do two str2time() calls like this:
# Two Dates to Compare #
$date1 = strtotime(Oct 18, 2002);
$date2 = strtotime(Jan 18, 2002);
# Assign the earliest date and laterdate to variables #
$earlyDate = ($date1 $date2) ? $date1 : $date2;
$laterDate = ($earlyDate == $date1) ? $date2 :
Hi
I think this works :)
?
$date1 = 1/1/2002;
$date2 = date(m/d/Y);
$time1 = strtotime($date1);
$time2 = strtotime($date2);
//get the first monday after date1
$first_monday = strtotime(first monday,$time1);
//check if its within date2
if($first_monday $time2):
//set count to 0 as we
On Sun, 19 May 2002, Josh Edwards wrote:
Does anyone know a good way to count the days between two dates. ie how
many Mondays fall between two dates. As a starting point I have calculated
the start and end dates and the no of days b/w them.
Pretty much common sense, right? How about
On Mon, Aug 20, 2001 at 12:12:15PM +0100, Peter Allum wrote:
I am using PHP 4, I have a date which I am adding to a MYSQL db, I have that
bit sorted, I am trying to calculate an 2 expiry dates, one that is 1 year
and 11 months ahead of the 1st date and another that is 2 years ahead of the
1st
10 matches
Mail list logo