Ron Piggott skrev:
How do I break $start_date into 3 variables --- 4 digit year, 2 digit
month and 2 digit day?
$start_year = ;
$start_month = ;
$start_day = ;
Of course depending on what $start_date looks like, but this should work
most of the time:
$timestamp = strtotime( $start_date );
2007. 06. 20, szerda keltezéssel 09.35-kor Ron Piggott ezt írta:
> How do I break $start_date into 3 variables --- 4 digit year, 2 digit
> month and 2 digit day?
>
> $start_year = ;
> $start_month = ;
> $start_day = ;
>
depends on what format do you have $start_date in
if you have something like
>
>
> How do I break $start_date into 3 variables --- 4 digit year, 2 digit
> month and 2 digit day?
>
> $start_year = ;
> $start_month = ;
> $start_day = ;
>
Can you give us an example of $start_date?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.n
Ron Piggott wrote:
How do I break $start_date into 3 variables --- 4 digit year, 2 digit
month and 2 digit day?
$start_year = ;
$start_month = ;
$start_day = ;
Depends what $start_date looks like.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, vi
How do I break $start_date into 3 variables --- 4 digit year, 2 digit
month and 2 digit day?
$start_year = ;
$start_month = ;
$start_day = ;
On 6/19/07, Richard Heyes <[EMAIL PROTECTED]> wrote:
Shafiq Rehman wrote:
> Hello,
>
> There's another way out there using mysql
>
> SELECT DATE_ADD('$expiry_date', INTERVAL 7 DAY) as fDate
>
> but of course not a recommended way.
So why suggest it?
just to share the knowledge
In fact you
Shafiq Rehman wrote:
Hello,
There's another way out there using mysql
SELECT DATE_ADD('$expiry_date', INTERVAL 7 DAY) as fDate
but of course not a recommended way.
So why suggest it?
In fact you can use it update query
(update tbl_name set expiry_date = date_add('$expiry_date', INTERVAL 7
Hello,
There's another way out there using mysql
SELECT DATE_ADD('$expiry_date', INTERVAL 7 DAY) as fDate
but off course not a recommended way. In fact you can use it update query
(update tbl_name set expiry_date = date_add('$expiry_date', INTERVAL 7 DAY)
where user ='$user')
--
Shafiq Rehman
Larry Garfield wrote:
(Note: strtotime() is probably not the fastest to execute way of doing it, but
it's the fastest to write. Choose wisely.)
Is it? How about:
$timestamp = strtotime($expiry_date) + (86400 * 7);
--
Richard Heyes
0844 801 1072
http://www.websupportsolutions.co.uk
Knowledge
On Monday 18 June 2007, Robert Cummings wrote:
> On Mon, 2007-06-18 at 21:57 -0400, Ron Piggott wrote:
> > If
> >
> > $expiry_date = "2007-10-17";
> >
> > How do I add 7 days to this? I know the strtotime("+7 days"); command,
> > but don't know how to make it work with a date that isn't today.
>
>
On Mon, 2007-06-18 at 21:57 -0400, Ron Piggott wrote:
> If
>
> $expiry_date = "2007-10-17";
>
> How do I add 7 days to this? I know the strtotime("+7 days"); command,
> but don't know how to make it work with a date that isn't today.
You would do:
strtotime( '+7 days', $time );
The $time
If
$expiry_date = "2007-10-17";
How do I add 7 days to this? I know the strtotime("+7 days"); command,
but don't know how to make it work with a date that isn't today.
(Please respond directly to my e-mail address)
Ron
On 5/21/07, Mike Ryan <[EMAIL PROTECTED]> wrote:
Sorry I am a bit of a newbie with php and hope this has not been aswered a
million times, but here it goes
I have a date base with a couple of date fields when I pull up and display
the fields it show 2007-05-21. the question I have is how to con
Sorry I am a bit of a newbie with php and hope this has not been aswered a
million times, but here it goes
I have a date base with a couple of date fields when I pull up and display
the fields it show 2007-05-21. the question I have is how to convert the
field to 05-21-2007?
Currently the command
2007. 03. 30, péntek keltezéssel 14.00-kor Jason Pruim ezt írta:
> On Mar 29, 2007, at 4:52 PM, Zoltán Németh wrote:
>
> >
>
>
> >
> > (I assume you want this calculation within one given day)
> > you could read all rows into an array like
> >
> > $timeinfo = array();
> > $sql = "SELECT minute,
On Mar 29, 2007, at 4:52 PM, Zoltán Németh wrote:
(I assume you want this calculation within one given day)
you could read all rows into an array like
$timeinfo = array();
$sql = "SELECT minute, sequence FROM table WHERE day='$day'";
$result = mysql_query($result);
while ($row = mysql_fe
On Mar 29, 2007, at 6:16 PM, Jim Lucas wrote:
you stated in a different email that there are 6 possible values/
settings for the sequence col.
what are they, and what do they mean?
One person asked about missed punches. What happens if someone
forgets to clock out? Is an entry made for
Jason Pruim wrote:
Hi Everyone,
First off, I'm using PHP 5.2.0 and apache 1.3.33
I am trying to figure out what format a string is in in a database. It's
a timecard system that I have found on-line and I am attempting to
figure out how to write a script that would give me everyones timecard
Roberto Mansfield wrote:
Jason Pruim wrote:
Thanks everyone for your suggestions, it turns out it was a unix time
stamp and I can get it to parse out a normal date now.
Now... on to the harder part
What I am trying to do is learn... This is kind of just a pet project
for me to figure out h
Jason Pruim wrote:
> Thanks everyone for your suggestions, it turns out it was a unix time
> stamp and I can get it to parse out a normal date now.
>
> Now... on to the harder part
>
> What I am trying to do is learn... This is kind of just a pet project
> for me to figure out how I can do it
2007. 03. 29, csütörtök keltezéssel 16.38-kor Jason Pruim ezt írta:
> Thanks everyone for your suggestions, it turns out it was a unix time
> stamp and I can get it to parse out a normal date now.
>
> Now... on to the harder part
>
> What I am trying to do is learn... This is kind of just a
Thanks everyone for your suggestions, it turns out it was a unix time
stamp and I can get it to parse out a normal date now.
Now... on to the harder part
What I am trying to do is learn... This is kind of just a pet project
for me to figure out how I can do it. here is how the database i
2007. 03. 28, szerda keltezéssel 14.48-kor Travis Doherty ezt írta:
> Zoltán Németh wrote:
>
> >2007. 03. 28, szerda keltezéssel 15.35-kor Jason Pruim ezt írta:
> >
> >
> >>Hi Everyone,
> >>
> >>First off, I'm using PHP 5.2.0 and apache 1.3.33
> >>
> >>I am trying to figure out what format a str
decode the day. Any help or pointers to the "M"
> would be GREATLY appreciated! :)
That is a UNIX timestamp, which is the type of date that the php date()
function takes as a 2nd parameter. So for example,
You can also format it in the query like so:
mysql> SELECT FROM_UNIX
Zoltán Németh wrote:
>2007. 03. 28, szerda keltezéssel 15.35-kor Jason Pruim ezt írta:
>
>
>>Hi Everyone,
>>
>>First off, I'm using PHP 5.2.0 and apache 1.3.33
>>
>>I am trying to figure out what format a string is in in a database.
>>It's a timecard system that I have found on-line and I am a
2007. 03. 28, szerda keltezéssel 15.35-kor Jason Pruim ezt írta:
> Hi Everyone,
>
> First off, I'm using PHP 5.2.0 and apache 1.3.33
>
> I am trying to figure out what format a string is in in a database.
> It's a timecard system that I have found on-line and I am attempting
> to figure out h
Jason Pruim wrote:
> Hi Everyone,
>
> First off, I'm using PHP 5.2.0 and apache 1.3.33
>
> I am trying to figure out what format a string is in in a database.
> It's a timecard system that I have found on-line and I am attempting
> to figure out how to write a script that would give me everyones
Jason Pruim wrote:
Hi Everyone,
First off, I'm using PHP 5.2.0 and apache 1.3.33
I am trying to figure out what format a string is in in a database.
It's a timecard system that I have found on-line and I am attempting
to figure out how to write a script that would give me everyones
timecard
Hi Everyone,
First off, I'm using PHP 5.2.0 and apache 1.3.33
I am trying to figure out what format a string is in in a database.
It's a timecard system that I have found on-line and I am attempting
to figure out how to write a script that would give me everyones
timecard for the month on
March 22, 2007 7: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 betwe
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,
Dear All,
I was wondering if there are any major date function changes between php4 and
5.
When I say date function I mean mktime() , date() ,strtotime() etc.
Here is my dilemma, I've upgraded from php4 to php5. there is some very old
legacy code that is not working correctly.
Specifically o
On Thu, February 1, 2007 6:30 pm, John Taylor-Johnston wrote:
> How do I take "2007-02-01" and turn it into Thursday, February 1,
> 2006?
> Simple question, except I don't know the answer :)
> This is all I see for now:
> http://ca.php.net/manual/en/function.px-date2string.php
list($year, $month,
John Taylor-Johnston wrote:
Chris wrote:
John Taylor-Johnston wrote:
How do I take "2007-02-01" and turn it into Thursday, February 1, 2006?
Use strtotime (http://php.net/strtotime) to turn it into a timestamp
and then format it using date (http://php.net/date).
echo date("l, F j, Y", st
Chris wrote:
John Taylor-Johnston wrote:
How do I take "2007-02-01" and turn it into Thursday, February 1, 2006?
Use strtotime (http://php.net/strtotime) to turn it into a timestamp and
then format it using date (http://php.net/date).
echo date("l, F j, Y", strtotime("2007-02-01"));
That'
John Taylor-Johnston wrote:
How do I take "2007-02-01" and turn it into Thursday, February 1, 2006?
Use strtotime (http://php.net/strtotime) to turn it into a timestamp and
then format it using date (http://php.net/date).
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP Gen
How do I take "2007-02-01" and turn it into Thursday, February 1, 2006?
Simple question, except I don't know the answer :)
This is all I see for now:
http://ca.php.net/manual/en/function.px-date2string.php
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.ph
On Sat, January 27, 2007 10:51 pm, Ron Piggott wrote:
> I have date in the variable $date_reference in the format -MM-DD.
> How do I find out the date before this and the date after this? Ron
$date_reference = date('Y-m-d');
list($y, $m, $d) = explode('-', $date_reference);
//Let the computer
Someone sent me the strtotime function. This was the command I was
needing. Ron
On Sun, 2007-01-28 at 08:57 -0600, David Giragosian wrote:
> Ron Piggott wrote:
> > I have date in the variable $date_reference in the format
> -MM-DD.
> > How do I find out the d
Ron Piggott wrote:
> I have date in the variable $date_reference in the format -MM-DD.
> How do I find out the date before this and the date after this? Ron
>
Not enough information, Ron. Do you mean: 1. as exists in some data set that
you've created or stored, like in an array or a datab
On sáb, 2007-01-27 at 23:51 -0500, Ron Piggott wrote:
> I have date in the variable $date_reference in the format -MM-DD.
> How do I find out the date before this and the date after this? Ron
>
http://us3.php.net/manual/en/function.date.php#68716
RTFM :-P
signature.asc
Description: This
Read http://us3.php.net/manual/en/function.strtotime.php.
It might help.
On 1/27/07, Ron Piggott <[EMAIL PROTECTED]> wrote:
I have date in the variable $date_reference in the format -MM-DD.
How do I find out the date before this and the date after this? Ron
--
PHP General Mailing List (ht
I have date in the variable $date_reference in the format -MM-DD.
How do I find out the date before this and the date after this? Ron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Yea, I just figured this out. When I cut and pasted I must have overwrote
the =.
Thanks
> -Original Message-
> From: Stut [mailto:[EMAIL PROTECTED]
> Sent: January 4, 2007 4:27 PM
> To: Beauford
> Cc: PHP
> Subject: Re: [PHP] Date problems
>
> Beauford wrote:
Beauford wrote:
$query "select count(date) as count, YEAR(date) as thisyear from stats group
^ = needed here
by thisyear";
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi All,
I have a database with a bunch of dates in it. I want to count the number of
entries for each year and then display the year and the count.
i.e.
YearCount
200622
200518
200414
200322
This is what I have tried but just not quite getting it.
$query "select count(date)
have you ever had the need to programmatically convert a date()
compatible date formatting string with one compatible for strftime()?
I had this problem recently when I had to l10n an existing app (and
support legacy data - which include date() formatting strings - at the
same time) ... I came up
Fernando M. M. wrote:
>
> I´m using php5 here.
>
> But like i said i have lots of scripts inside this
> folder, is there a way to set something on .htaccess to change the timezone?
>
yes. I suggest you actually following the given links and read what's there -
that's what I did to answer your q
I´m using php5 here.
But like i said i have lots of scripts inside this
folder, is there a way to set something on .htaccess to change the timezone?
> Fernando M. M. wrote:
>>
>> Hello,
>>
>> I have a lot of php scripts that uses date() for some
important
>> operations. Yesterday those scrip
Fernando M. M. wrote:
I have a lot of php scripts that uses date() for some important
operations. Yesterday those scripts were moved to another server which is on an
different timezone. I haven't predicted this so my scripts aren't working
anymore. The
servers timezone is GMT -4 and mine is GMT
Fernando M. M. wrote:
>
> Hello,
>
> I have a lot of php scripts that uses date() for some important
> operations. Yesterday those scripts were moved to another server which is on
> an
> different timezone. I haven't predicted this so my scripts aren't working
> anymore. The
> servers timezone
Hello,
I have a lot of php scripts that uses date() for some important
operations. Yesterday those scripts were moved to another server which is on an
different timezone. I haven't predicted this so my scripts aren't working
anymore. The
servers timezone is GMT -4 and mine is GMT -2. Is there a
On Tue, 14 Nov 2006 15:11:56 -0500, Brad Fuller wrote:
>
>
> $prevminute = sprintf('%02s', date("i")-1);
Or, $prevminute = str_pad(date("i")-1, 2, '0', STR_PAD_LEFT);
It's a little more code - don't ask me about the speed :)
Ivo
--
PHP General Mailing List (http://www.php.net/)
To unsubscr
$prevminute = sprintf('%02s', date("i")-1);
> -Original Message-
> From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 14, 2006 1:17 PM
> To: PHP General List
> Subject: [PHP] date() function
>
>
>
I noticed that if I do something like this:
$prevminute = date("i")-1;
..and the current minute happens to be '05', $prevminute becomes '4'
- I lose the padding. How can I ensure that I retain that padding? I
suppose a crud solution is to run $prevminute through an if loop to see
Ron Piggott (PHP) wrote:
>I have one more date based question.
>
>I have a month field ( $month ) and a day field ( $day ) being submitted
>by a form.
>
>I have a third field to be used as a date reminder for the information
>which was submitted as part of the form. It is a reminder to complete a
I have one more date based question.
I have a month field ( $month ) and a day field ( $day ) being submitted
by a form.
I have a third field to be used as a date reminder for the information
which was submitted as part of the form. It is a reminder to complete a
task for the date was which was
On Mon, October 9, 2006 11:26 am, Ron Piggott (PHP) wrote:
> Is there a PHP function which verifies a valid date has been entered
> (-MM-DD)? Ron
Note that both solutions so far are only partial solutions for most
real world scenarios.
For example:
0001-12-25
will pass both, and would appear
Ron Piggott (PHP) wrote:
Is there a PHP function which verifies a valid date has been entered
(-MM-DD)? Ron
http://www.php.net/manual/en/function.checkdate.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ron Piggott (PHP) wrote:
Is there a PHP function which verifies a valid date has been entered
(-MM-DD)? Ron
preg_match('/^(\d{4})-(\d\d)-(\d\d)\z/', $s, $m) && checkdate($m[2],
$m[3], $m[1])
Arpad
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php
Is there a PHP function which verifies a valid date has been entered
(-MM-DD)? Ron
At 9:19 PM +0100 9/10/06, Dave Goodchild wrote:
Has anyone out there had to deal with a similar problem, and if so do you
have any advice. This is going to take time so I will be patient and
continue, and welcome any suggestions. Many thanks and I can post code to
specific requests.
Dave:
You
works well, but make sure that your date/time strings
conform to the GNU datetime specs.
2. There are 86400 seconds in a day.
3. Date also accepts parameters like +1month and -1month, this works for
days, weeks, months etc.
4. Google "php calendar class and php date class" you will
Hi all. I am in the midst of creating a national online events directory (ie
evening classes, coffee mornings, yard sales etc). The user is able to enter
one-off events or regular events (daily, weekly, monthly) and each event
entered makes up one record in the events table in the db (mysql). Peop
ent out my second email before I had read yours. I'll give yours
a go, thanks again.
Mark
-Original Message-
From: Adam Zey [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 02, 2006 11:15 AM
To: Mark Steudel
Cc: PHP Mailing Lists
Subject: Re: [PHP] date(n/Y) strtotime
Mark Steudel wr
Thanks Adam,
I had sent out my second email before I had read yours. I'll give yours
a go, thanks again.
Mark
-Original Message-
From: Adam Zey [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 02, 2006 11:15 AM
To: Mark Steudel
Cc: PHP Mailing Lists
Subject: Re: [PHP] dat
{
Echo 'true';
}
If( strtotime( '1/2009') == '-1' )
{
Echo 'false';
}
Else
{
Echo 'true';
}
All of those echo true, how do I determine if strtotime has failed or
not?
Mark
-Original Message-
From: Mark Steudel
Sent: Wednesday, August 02, 2006
}
If( strtotime( '1/2009') == '-1' )
{
Echo 'false';
}
Else
{
Echo 'true';
}
All of those echo true, how do I determine if strtotime has failed or
not?
Mark
-Original Message-
From: Mark Steudel
Sent: Wednesday, August 02, 2006 9:55 AM
To: Mark
rk
-----Original Message-
From: Mark Steudel
Sent: Wednesday, August 02, 2006 9:46 AM
To: PHP Mailing Lists
Subject: [PHP] date(n/Y) strtotime
I've always been really amazed at how well strtotime works, but recently
ran into an issue where it couldn't figure out the date if it was a c
I've always been really amazed at how well strtotime works, but recently
ran into an issue where it couldn't figure out the date if it was a cc
exp date in long format, e.g. 1/2009. I was curious if anyone else has
run into this and how did they get around it, here was my solution:
function expDat
+$i,$syear);
$dates[$i] = date( "m/d/Y", $added );
}
return $dates;
}
[SNIP]
Good luck,
Jef
-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 23, 2006 3:27 PM
To: Dave Goodchild
Cc: php-general@lists.php.net
Subj
mktime() args are hour/minute/second/month/day/year or somesuch.
You are passing in a string, which PHP tries to convert to int, which
results in who knows what, on the line that starts $added =
On Tue, May 23, 2006 6:11 am, Dave Goodchild wrote:
> Hi all, I am writing an app that runs a prize
On 5/23/06, Dave Goodchild <[EMAIL PROTECTED]> wrote:
Hi all, I am writing an app that runs a prize draw, wherein the admin
chooses the duration by adding a start date and number of days for the draw
to run. These values are passed into a small function that generates an
array holding the start d
Hi all, I am writing an app that runs a prize draw, wherein the admin
chooses the duration by adding a start date and number of days for the draw
to run. These values are passed into a small function that generates an
array holding the start date, end date and all dates in between as follows:
fun
day in the above line
of
code.
Good luck,
Jef
-Original Message-
From: Scott Hurring [mailto:[EMAIL PROTECTED]
Sent: Sunday, May 21, 2006 12:18 PM
To: Rabin Vincent; php-general@lists.php.net
Subject: Re: [PHP] Date() finding yesterday
mktime also works: http://php.net/mktime:
date(
mktime also works: http://php.net/mktime:
date("Y-m-d", mktime( ... ))
On 5/21/06, Rabin Vincent <[EMAIL PROTECTED]> wrote:
On 5/21/06, John Taylor-Johnston
<[EMAIL PROTECTED]> wrote:
> I cannot seem to get this right. How can I produce yesterday?
>
> $today = date("Y-m-d");
> $yesterday = dat
On 5/21/06, John Taylor-Johnston
<[EMAIL PROTECTED]> wrote:
I cannot seem to get this right. How can I produce yesterday?
$today = date("Y-m-d");
$yesterday = date("Y-m-") . date("d")-1;
$yesterday = date("Y-m-d")-1;
$yesterday = date("Y-m-"."d"-1);
I've been looking at the manual :) ...
Use
I cannot seem to get this right. How can I produce yesterday?
$today = date("Y-m-d");
$yesterday = date("Y-m-") . date("d")-1;
$yesterday = date("Y-m-d")-1;
$yesterday = date("Y-m-"."d"-1);
I've been looking at the manual :) ...
Thanks,
John
--
PHP General Mailing List (http://www.php.net/)
To
I'd agree with what Richard is alluding to: turn your two dates into
timestamps, and then compare those. mktime() or strtotime() should
help you out.
HTH,
John W
On 4/18/06, Richard Lynch <[EMAIL PROTECTED]> wrote:
> http://php.net/mktime may be more suitable, depending on the date
> range of th
http://php.net/mktime may be more suitable, depending on the date
range of the input.
That said, as far as I can tell, your $formated_expiry_date is the
SAME as your $expiry_date, except possibly for some separation
characters.
If the separation characters are ALWAYS the same, you could just do:
Hi everyone,
this is the function I have written for comparing a date time please tell me
if my logic is correct ? and if there's a better alternative please let me
know of that as well.
// This function will return 1 if supplied date is expired
function is_expire($expiry_date){
$current_date=date(
Satyam wrote:
Timestamps are stored as seconds from a certain date. The base date
differ depending on the platform, Windows use 1/1/1980 the rest
1/1/1970, but still seconds. 7 days are 7*24*60*60. Just add that much
to a timestamp. It helps having a constant such as:
define ('DAY_IN_SECO
x27;,86400);
Satyam
- Original Message -
From: "Mace Eliason" <[EMAIL PROTECTED]>
To:
Sent: Sunday, April 09, 2006 4:14 AM
Subject: [PHP] Date problems
Hi,
I am having troubles adding 7 days to the current date. I have been
reading through php.net date() and this i
Rasmus Lerdorf wrote:
Mace Eliason wrote:
Hi,
I am having troubles adding 7 days to the current date. I have been
reading through php.net date() and this is what I have come up with
but it doesn't work
$today = date('m/d/Y');
$nextweek = date('m/d/Y',mktime(date("m"), date("d")+7, date("Y")
Mace Eliason wrote:
Hi,
I am having troubles adding 7 days to the current date. I have been
reading through php.net date() and this is what I have come up with but
it doesn't work
$today = date('m/d/Y');
$nextweek = date('m/d/Y',mktime(date("m"), date("d")+7, date("Y")));
if I echo the abov
Hi,
I am having troubles adding 7 days to the current date. I have been
reading through php.net date() and this is what I have come up with but
it doesn't work
$today = date('m/d/Y');
$nextweek = date('m/d/Y',mktime(date("m"), date("d")+7, date("Y")));
if I echo the above variables they are
: Wednesday, March 29, 2006 2:52 PM
To: php-general@lists.php.net
Subject: [PHP] Date addition problem
Hi
I am having an unusual problem when trying to calculate dates in advance
from a start date. the code below shows a loop where by on each run an
increasing number of weeks is added to the start date
Hi:
The problem is that you have transposed your date elements.
See this:
http://xn--ovg.com/a3.php
Try this code:
date test (d/m/y)";
$start = "05-09-07";
$start = explode('-',$start);
$startmk = mktime(0,0,0,$start[1],$start[0],$start[2]);
$startdate = date('d-m-y',$startmk);
print_r($sta
> -Original Message-
> From: Adrian Bruce [mailto:[EMAIL PROTECTED]
> Sent: 29 March 2006 13:52
>
> I am having an unusual problem when trying to calculate dates
> in advance
> from a start date. the code below shows a loop where by on
> each run an
> increasing number of weeks is ad
I have come up with an alternative myself but still cant explain why the
first method did not work, still be interested to know why if anyone can
offer some thoughts. Using strtotime for the calc seems to produce
correct results
my soluiton:
[snip]
date test 2";
$start = "05-09-07";
$start
That should not effect it, if i am adding $i * 7 days each time then i
should get the date that comes 7 days later irrespective of how many
days are in the month, shouldn't I ? 8 * 7 = 56, 56 days after the
07-09-05 is 02-11-2005.
Thomas Munz wrote:
Cause 9th month have 30 days but 10th mont
Cause 9th month have 30 days but 10th month have 31 days. You don't check the
amount of day there... :)
on Wednesday 29 March 2006 14:51, Adrian Bruce wrote:
> Hi
>
> I am having an unusual problem when trying to calculate dates in advance
> from a start date. the code below shows a loop where
Hi
I am having an unusual problem when trying to calculate dates in advance
from a start date. the code below shows a loop where by on each run an
increasing number of weeks is added to the start date, this works as
expected up untill the 8th time where for some reason it produces
01-11-05 i
on the fly:
use date_format function in select statement, format should be a string
like %d%m%y not sure about it check on manual.
hth
adriano
2006/3/17, Tom Chubb <[EMAIL PROTECTED]>:
>
> Please can you help me. I've created a page where problems are posted into
> a
> database and I am usin
Hi
How about doing this in the query string you send to mysql:
DATE_FORMAT(fieldname, '%d %m %y')
this way you wont have to mess around with the array stuff. for more info look
here
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
Regards
Pure Web Solution
http://www.purewe
Please can you help me. I've created a page where problems are posted into a
database and I am using the datetime format in MySQL and trying to find the
best way to display it in the 17/03/06 format.
I've found a way of doing it (so you don't think I haven't googled, RTFM)
but don't think it's the
; From: Dan McCullough [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, March 15, 2006 10:22 AM
> > To: Shaunak Kashyap
> > Subject: Re: [PHP] date from -MM-DD to current date
> >
> > excellent, I was getting close, was getting hung up on a couple of
> th
.
> -Original Message-
> From: Dan McCullough [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 15, 2006 10:22 AM
> To: Shaunak Kashyap
> Subject: Re: [PHP] date from -MM-DD to current date
>
> excellent, I was getting close, was getting hung up on a couple of
things
>
8 AM
> To: php-general@lists.php.net
> Subject: [PHP] date from -MM-DD to current date
>
> I need to loop from a date in the past to current date getting all
> dates in between. Anyone have an idea on how to do that?
>
> --
> PHP General Mailing List (http://www.php.net
I need to loop from a date in the past to current date getting all
dates in between. Anyone have an idea on how to do that?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
201 - 300 of 1067 matches
Mail list logo