Re: [PHP] Question about date calculations

2012-01-01 Thread Matijn Woudt
On Fri, Dec 30, 2011 at 5:33 PM, Eric Lommatsch wrote: > > When I try this method: > > > > $interval = $dteStartDate[$intCnt]->diff($dteEndDate[$intCnt]); I get the > following error when I run the page: > > " Fatal error : Call to undefined method DateTime::diff() in > /var/www/evalHomeLime.php

RE: Re: [PHP] Question about date calculations

2011-12-30 Thread admin
m > > > > > er...@pivotaldata.com > > > > > > -Original message- > From: Fatih P. > Sent: Thu 29-12-2011 16:16 > To: ad...@buskirkgraphics.com; > CC: 'Frank Arensmeier' ; 'Eric Lommatsch' > ; p

Re: [PHP] Question about date calculations

2011-12-30 Thread Jim Lucas
On 12/29/2011 01:22 PM, Eric Lommatsch wrote: Hello List, I am using PHP version 5.2.6. I am using PHP V5.3.3 In my setup, the following lines give me errors stating that PHP cannot convert the DateTime object to a string. I was able to get around the error by changing your code to the fol

RE: Re: [PHP] Question about date calculations

2011-12-30 Thread Eric Lommatsch
mmatsch' ; php-general@lists.php.net; Subject: Re: [PHP] Question about date calculations On 12/30/2011 12:19 AM, ad...@buskirkgraphics.com wrote: -Original Message- From: Fatih P. [ mailto:fatihpirist...@gmail.com ] Sent: Thursday, December 29, 2011 5:10 PM To: Frank Arensmeier Cc:

RE: [PHP] Question about date calculations

2011-12-30 Thread Eric Lommatsch
x27;Frank Arensmeier' ; CC: 'Eric Lommatsch' ; php-general@lists.php.net; Subject: RE: [PHP] Question about date calculations > -Original Message- > From: Fatih P. [mailto:fatihpirist...@gmail.com] > Sent: Thursday, December 29, 2011 5:10 PM > To: Frank Are

RE: Re: [PHP] Question about date calculations

2011-12-30 Thread Eric Lommatsch
Ext 23 Fax 888-282-9927   www.pivotaldata.com   er...@pivotaldata.com       -Original message- From: Frank Arensmeier Sent: Thu 29-12-2011 15:25 To: Eric Lommatsch ; CC: php-general@lists.php.net; Subject: Re: [PHP] Question about date calculations 29 dec 2011 kl. 22.22 skrev

Re: [PHP] Question about date calculations

2011-12-29 Thread Lester Caine
Fatih P. wrote: well then look deeper in the question: "I have a page I am trying to create where I am comparing the values of two MySQL date fields with the current date. One of the *MySQL Date fields *is a class start date,*the other* is the class end date." all needs to do is modify his quer

Re: [PHP] Question about date calculations

2011-12-29 Thread Fatih P.
On 12/30/2011 12:19 AM, ad...@buskirkgraphics.com wrote: -Original Message- From: Fatih P. [mailto:fatihpirist...@gmail.com] Sent: Thursday, December 29, 2011 5:10 PM To: Frank Arensmeier Cc: Eric Lommatsch; php-general@lists.php.net Subject: Re: [PHP] Question about date calculations

RE: [PHP] Question about date calculations

2011-12-29 Thread admin
> -Original Message- > From: Fatih P. [mailto:fatihpirist...@gmail.com] > Sent: Thursday, December 29, 2011 5:10 PM > To: Frank Arensmeier > Cc: Eric Lommatsch; php-general@lists.php.net > Subject: Re: [PHP] Question about date calculations > > On Thu, Dec 29,

Re: [PHP] Question about date calculations

2011-12-29 Thread Fatih P.
On Thu, Dec 29, 2011 at 11:40 PM, Frank Arensmeier wrote: > 29 dec 2011 kl. 22.22 skrev Eric Lommatsch: > > > So far in looking at the functions that are available at > > http://www.php.net/manual/en/ref.datetime.php I have not been able to > figure > > out how to do what I need to do. Below is a

Re: [PHP] Question about date calculations

2011-12-29 Thread Frank Arensmeier
29 dec 2011 kl. 22.22 skrev Eric Lommatsch: > So far in looking at the functions that are available at > http://www.php.net/manual/en/ref.datetime.php I have not been able to figure > out how to do what I need to do. Below is a snippet showing approximately > what I am trying to do. On the same

[PHP] Question about date calculations

2011-12-29 Thread Eric Lommatsch
Hello List, I am using PHP version 5.2.6. I have a page I am trying to create where I am comparing the values of two MySQL date fields with the current date. One of the MySQL Date fields is a class start date, the other is the class end date. First I need to calculate the number of days

Re: [PHP] Question about date()

2008-10-07 Thread Ashley Sheridan
On Tue, 2008-10-07 at 19:47 +0100, Richard Heyes wrote: > > Luckily for me it all still worked afterwards! > > The pen drive or the code? :-) > > -- > Richard Heyes > > HTML5 Graphing for FF, Chrome, Opera and Safari: > http://www.phpguru.org/RGraph > Both! Ash www.ashleysheridan.co.uk --

Re: [PHP] Question about date()

2008-10-07 Thread Richard Heyes
> Luckily for me it all still worked afterwards! The pen drive or the code? :-) -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.phpguru.org/RGraph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Question about date()

2008-10-07 Thread Ashley Sheridan
On Tue, 2008-10-07 at 07:54 -0400, Jason Pruim wrote: > On Oct 7, 2008, at 7:49 AM, Richard Heyes wrote: > > >> I am trying real hard to write clean code... > > > > Print it out and stick it in the washing machine... :-) > > The way I used to write code I'd have to soak it in bleach for a week

Re: [PHP] Question about date()

2008-10-07 Thread Jason Pruim
On Oct 7, 2008, at 7:41 AM, Stut wrote: On 7 Oct 2008, at 12:38, Jason Pruim wrote: I am trying to track down an error and can't seem to figure it out... Here is the error out of my log: [Tue Oct 7 07:31:43 2008] [error] PHP Warning: date() expects parameter 2 to be long, string given i

Re: [PHP] Question about date()

2008-10-07 Thread tedd
At 1:08 PM +0100 10/7/08, Stut wrote: On 7 Oct 2008, at 12:48, Jason Pruim wrote: Thanks for the quick response... You were right... I did a var_dump both on $row['timein'] and $row['timeout'] and the error was because of the way that I update the records. for time in, I insert a new record, f

Re: [PHP] Question about date()

2008-10-07 Thread Stut
On 7 Oct 2008, at 12:48, Jason Pruim wrote: On Oct 7, 2008, at 7:41 AM, Stut wrote: On 7 Oct 2008, at 12:38, Jason Pruim wrote: I am trying to track down an error and can't seem to figure it out... Here is the error out of my log: [Tue Oct 7 07:31:43 2008] [error] PHP Warning: date() exp

Re: [PHP] Question about date()

2008-10-07 Thread Jason Pruim
On Oct 7, 2008, at 7:49 AM, Richard Heyes wrote: I am trying real hard to write clean code... Print it out and stick it in the washing machine... :-) The way I used to write code I'd have to soak it in bleach for a week before having a chance of it coming out clean! :P -- Jason Pruim

Re: [PHP] Question about date()

2008-10-07 Thread Richard Heyes
> I am trying real hard to write clean code... Print it out and stick it in the washing machine... :-) -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.phpguru.org/RGraph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/un

Re: [PHP] Question about date()

2008-10-07 Thread Stut
On 7 Oct 2008, at 12:38, Jason Pruim wrote: I am trying to track down an error and can't seem to figure it out... Here is the error out of my log: [Tue Oct 7 07:31:43 2008] [error] PHP Warning: date() expects parameter 2 to be long, string given in /Volumes/RAIDer/webserver/ Documents/dev

[PHP] Question about date()

2008-10-07 Thread Jason Pruim
Good morning all! I am trying to track down an error and can't seem to figure it out... Here is the error out of my log: [Tue Oct 7 07:31:43 2008] [error] PHP Warning: date() expects parameter 2 to be long, string given in /Volumes/RAIDer/webserver/ Documents/dev/stimecard/timecard.php o

Re: [PHP] Question About Date Function in PHP/MySQL

2004-02-08 Thread Freedomware
John W. Holmes wrote: Freedomware wrote: EMS lists the following: Short Date: M/d/ Long Date: , dd, Day followed by month, followed by another day, then year??? That format means something like "Friday, May 5, 2004" I thought it was supposed to be year first, followed by mont

Re: [PHP] Question About Date Function in PHP/MySQL

2004-02-08 Thread John W. Holmes
Freedomware wrote: EMS lists the following: Short Date: M/d/ Long Date: , dd, Day followed by month, followed by another day, then year??? That format means something like "Friday, May 5, 2004" I thought it was supposed to be year first, followed by month and day, as in the ex

Re: [PHP] Question About Date Function in PHP/MySQL

2004-02-08 Thread Freedomware
John W. Holmes wrote: Freedomware wrote: When I view my data in phpMyAdmin, all I see in that column is NULL. When I preview it in a webpage, nothing displays at all. If I change it to NOT NULL, I see -00-00 in every cell. Here's a row of text from the CSV file I imported into my MySQL tab

Re: [PHP] Question About Date Function in PHP/MySQL

2004-02-08 Thread John W. Holmes
Freedomware wrote: When I view my data in phpMyAdmin, all I see in that column is NULL. When I preview it in a webpage, nothing displays at all. If I change it to NOT NULL, I see -00-00 in every cell. Here's a row of text from the CSV file I imported into my MySQL table: "Alberta","Edmonto

[PHP] Question About Date Function in PHP/MySQL

2004-02-08 Thread Freedomware
I'm using PHP to display a MySQL table. I've got everything working fine except the date function. I designated the first two fields VARCHAR. Those columns display just fine when I preview my web page, as do all the other columns except the third. I designated that one DATE. (The field name is