Re: [PHP] Date question

2006-02-24 Thread Sumeet
William Stokes wrote: Hello, I have a datetime column in MySQL DB. How can I match to that column from php code if I only have the date information available. 2006-02-24 12:00:00 against2006-02-24 This might be more SQL question sorry about that. Thanks -Will use

Re: [PHP] Date question

2006-02-24 Thread Chris Boget
I have a datetime column in MySQL DB. How can I match to that column from php code if I only have the date information available. 2006-02-24 12:00:00 against2006-02-24 This might be more SQL question sorry about that. use date_format(%Y-%m-%d,'date_column') in the sql

[PHP] date(H, $datevalue) always adds an hour?

2006-01-20 Thread Murray @ PlanetThoughtful
Hi All, Wondering if anyone can help me work out why date(H) always adds an hour? I'm *assuming* it thinks it should be compensating for Daylight Saving Time (though I'd be just as willing to believe that it's caused by something else), however we don't observe DST in Queensland, Australia.

Re: [PHP] date(H, $datevalue) always adds an hour?

2006-01-20 Thread David Grant
Murray, What do you get if you print date(T)? David -- David Grant http://www.grant.org.uk/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date(H, $datevalue) always adds an hour?

2006-01-20 Thread Murray @ PlanetThoughtful
On 20/01/2006 8:39 PM, David Grant wrote: Murray, What do you get if you print date(T)? David Hi David, I get EST, which I assume is Eastern Savings Time? If that's the case, any idea where I change this value so that it only affects my local machine? Much warmth, Murray -- PHP

Re: [PHP] date(H, $datevalue) always adds an hour?

2006-01-20 Thread David Grant
Murray, As far as I know, Queensland is in EST (Eastern Standard Time), so that is the correct value. Are you using the same machine or is it remote? David -- David Grant http://www.grant.org.uk/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] date(H, $datevalue) always adds an hour?

2006-01-20 Thread Murray @ PlanetThoughtful
On 20/01/2006 8:48 PM, David Grant wrote: Murray, As far as I know, Queensland is in EST (Eastern Standard Time), so that is the correct value. Are you using the same machine or is it remote? David Hi David, I'm currently working entirely on my local (Queensland) machine. The remote

Re: [PHP] date(H, $datevalue) always adds an hour?

2006-01-20 Thread David Grant
Murray, I can't think what else it might be. Sorry! David -- David Grant http://www.grant.org.uk/ http://pear.php.net/package/File_Ogg0.2.1 http://pear.php.net/package/File_XSPF 0.1.0 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date(H, $datevalue) always adds an hour?

2006-01-20 Thread Silvio Porcellana [tradeOver]
David Grant wrote: Murray, I can't think what else it might be. Sorry! David What does date(I, $datevalue) return? (it's a capital 'i') I guess you already checked out this page... http://php.net/date -- tradeOver | http://www.tradeover.net ...ready to become the King of the World? --

Re: [PHP] date(H, $datevalue) always adds an hour?

2006-01-20 Thread Richard Lynch
On Fri, January 20, 2006 4:24 am, Murray @ PlanetThoughtful wrote: Wondering if anyone can help me work out why date(H) always adds an hour? I'm *assuming* it thinks it should be compensating for Daylight Saving Time (though I'd be just as willing to believe that it's caused by something

Re: [PHP] date(H, $datevalue) always adds an hour?

2006-01-20 Thread Michael Hulse
Hi, On Jan 20, 2006, at 2:24 AM, Murray @ PlanetThoughtful wrote: Can anyone help me figure out how to accommodate for this? Not sure if this will help, but: # Set time zone: putenv('TZ=US/Pacific'); // I am on west-coast, my servers are on east, if not for this code the timestamp used in

[PHP] date processing needed in form

2006-01-03 Thread Sue
Hello - I need to create a form that allows the user to select a Month, Day and Year. I am also new to PHP and am wondering if there is a way for me to display the contents of the Select list box (for the Day) based on the Month that is selected (and Year), so that the valid number of days

RE: [PHP] date processing needed in form

2006-01-03 Thread Jim Moseby
I need to create a form that allows the user to select a Month, Day and Year. I am also new to PHP and am wondering if there is a way for me to display the contents of the Select list box (for the Day) based on the Month that is selected (and Year), so that the valid number of days

Re: [PHP] Date Function Questions

2005-12-12 Thread Jesús Fernández
the date taken is the same as the local time of the webserver. So if it changes that maybe the server admin's are changing it? -- http://esu.proyectoanonimo.com http://www.proyectoanonimo.com

[PHP] Date Function Questions

2005-12-11 Thread [EMAIL PROTECTED]
This maybe a dumb questions, but in php where is the information taken from for the date() function? Is it pulled through Apache or the hardware or in the php.ini file? I am having an issue to where the time arbitraly changed one day from PST to CST.

[PHP] R: [PHP] Date Function Questions

2005-12-11 Thread Sebastian \En3pY\ Zdrojewski
utilizzo improprio è contrario ai principi del D.lgs 196/03 e alla legislazione Europea (Direttiva 2002/58/CE). -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Inviato: lunedì 12 dicembre 2005 6.57 A: PHP-General Oggetto: [PHP] Date Function Questions This maybe

[PHP] Re: R: [PHP] Date Function Questions

2005-12-11 Thread [EMAIL PROTECTED]
- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Inviato: lunedì 12 dicembre 2005 6.57 A: PHP-General Oggetto: [PHP] Date Function Questions This maybe a dumb questions, but in php where is the information taken from for the date() function? Is it pulled through Apache or the hardware

RE: [PHP] Re: R: [PHP] Date Function Questions

2005-12-11 Thread Matt Babineau
(Direttiva 2002/58/CE). -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Inviato: lunedì 12 dicembre 2005 6.57 A: PHP-General Oggetto: [PHP] Date Function Questions This maybe a dumb questions, but in php where is the information taken from

[PHP] date comparisions...

2005-10-07 Thread aaronjw
I am confused... probably because of lack of sleep. Anyway... I have code that looks like this: if ($discountResult[dateexpired] date(U)) { //dosomething } else { //do something else } Using Epoch obviously Anyway... it's supposed to read: IF the expired date is past the current

Re: [PHP] date comparisions...

2005-10-07 Thread Richard Davey
Hi aaronjw, Friday, October 7, 2005, 7:34:11 PM, you wrote: if ($discountResult[dateexpired] date(U)) { //dosomething } else { //do something else } Anyway... it's supposed to read: IF the expired date is past the current date... disallow dosomething otherwise... let it go.

Re: [PHP] date comparisions...

2005-10-07 Thread aaronjw
Hi Rich, Thanks for your reply. dateexpired is: 1128052800 which translates into: 2005-09-30 00:00:00 Basically, I'm just trying to figure out when the dateexpired is. IF it is past the current date then I am erroring out and if it's under the current date... I'm allowing the transaction. I

Re[2]: [PHP] date comparisions...

2005-10-07 Thread Richard Davey
Hi, Friday, October 7, 2005, 7:55:45 PM, you wrote: dateexpired is: 1128052800 which translates into: 2005-09-30 00:00:00 Basically, I'm just trying to figure out when the dateexpired is. IF it is past the current date then I am erroring out and if it's under the current date... I'm

[PHP] mysql/php date functions..

2005-09-26 Thread bruce
hi... can anybody point me to a good/basic tutorial (tested) for php/mysql date functions... basically, i want to store a date/time in a column, and be able to read it, manipulate it, and update the table. i've seen various articles/sample code, but i'm looking for something that i cna pretty

RE: [PHP] mysql/php date functions..

2005-09-26 Thread Jim Moseby
-Original Message- From: bruce [mailto:[EMAIL PROTECTED] Sent: Monday, September 26, 2005 11:12 AM To: php-general@lists.php.net Subject: [PHP] mysql/php date functions.. hi... can anybody point me to a good/basic tutorial (tested) for php/mysql date functions... basically

Re: [PHP] mysql/php date functions..

2005-09-26 Thread Silvio Porcellana
Jim Moseby wrote: Hi Bruce! MySQL and PHP both have extensive built-in date functions that are clearly documented and extraordinarily easy to use. For the vast majority of situations, there is no need to manually write any custom date-handling code. The decision to use MySQL or PHP to

RE: [PHP] mysql/php date functions..

2005-09-26 Thread bruce
-Original Message- From: Silvio Porcellana [mailto:[EMAIL PROTECTED] Sent: Monday, September 26, 2005 8:51 AM To: php-general@lists.php.net Subject: Re: [PHP] mysql/php date functions.. Jim Moseby wrote: Hi Bruce! MySQL and PHP both have extensive built-in date functions that are clearly

Re: [PHP] mysql/php date functions..

2005-09-26 Thread John Nichel
bruce wrote: how can i create a mysql sql statement to insert a php 'time()' into mysql? i've got the mysql var 't1, timestamp' but i can't figure out how to do an insert $q = time(); $sql = sprintf(insert into foo (id, ctime) values(%d, %???), $id, $q); can't figure out how to get this to

RE: [PHP] mysql/php date functions..

2005-09-26 Thread bruce
), it doesn't work... if i -- insert into foo (id, time) values (2, NOW()), it works!!... my question is why??? -bruce -Original Message- From: John Nichel [mailto:[EMAIL PROTECTED] Sent: Monday, September 26, 2005 11:00 AM To: php-general@lists.php.net Subject: Re: [PHP] mysql/php date

RE: [PHP] mysql/php date functions..

2005-09-26 Thread bruce
, September 26, 2005 11:00 AM To: php-general@lists.php.net Subject: Re: [PHP] mysql/php date functions.. bruce wrote: how can i create a mysql sql statement to insert a php 'time()' into mysql? i've got the mysql var 't1, timestamp' but i can't figure out how to do an insert $q = time

RE: [PHP] mysql/php date functions..

2005-09-26 Thread Chris W. Parker
bruce mailto:[EMAIL PROTECTED] on Monday, September 26, 2005 11:13 AM said: i'm concerned that i can't seem to craft/create a basic sql cmd within mysql to get a value (other than NOW()) to work... [snip] my question is why??? MySQL timestamps are different from UNIX timestamps. Chris.

Re: [PHP] mysql/php date functions..

2005-09-26 Thread John Nichel
bruce wrote: thanks... but that's not it john... i'm not worried about creating the sql_statement in the php... i'm concerned that i can't seem to craft/create a basic sql cmd within mysql to get a value (other than NOW()) to work... if i do (from mysql) -- insert into foo (id, time) values

RE: [PHP] mysql/php date functions..

2005-09-26 Thread bruce
but that still doesn't explain why i can't slam some value directly into the timestamp var within the mysql tbl... -Original Message- From: Chris W. Parker [mailto:[EMAIL PROTECTED] Sent: Monday, September 26, 2005 11:15 AM To: php-general@lists.php.net Subject: RE: [PHP] mysql/php date

RE: [PHP] mysql/php date functions..

2005-09-26 Thread bruce
john... that appears to be it!! although i would have assumes it would have done a most significant bit fill with 0's... so my question also comes down to .. do i use the php date functions for date/time manipulation.. or do i use the mysql functions any thoughts/suggestions... -bruce

Re: [PHP] mysql/php date functions..

2005-09-26 Thread John Nichel
bruce wrote: john... that appears to be it!! although i would have assumes it would have done a most significant bit fill with 0's... so my question also comes down to .. do i use the php date functions for date/time manipulation.. or do i use the mysql functions any thoughts/suggestions

RE: [PHP] mysql/php date functions..

2005-09-26 Thread Jim Moseby
-Original Message- From: bruce [mailto:[EMAIL PROTECTED] Sent: Monday, September 26, 2005 2:46 PM To: 'John Nichel'; php-general@lists.php.net Subject: RE: [PHP] mysql/php date functions.. john... that appears to be it!! although i would have assumes it would have done

RE: [PHP] mysql/php date functions..

2005-09-26 Thread bruce
Nichel [mailto:[EMAIL PROTECTED] Sent: Monday, September 26, 2005 11:48 AM To: php-general@lists.php.net Subject: Re: [PHP] mysql/php date functions.. bruce wrote: john... that appears to be it!! although i would have assumes it would have done a most significant bit fill with 0's... so my

RE: [PHP] mysql/php date functions..

2005-09-26 Thread bruce
bruce -Original Message- From: bruce [mailto:[EMAIL PROTECTED] Sent: Monday, September 26, 2005 12:38 PM To: 'John Nichel'; php-general@lists.php.net Subject: RE: [PHP] mysql/php date functions.. so you play with the time/date vars on the php side, and then simply store them in the mysql tbl

Re: [PHP] mysql/php date functions..

2005-09-26 Thread John Nichel
bruce wrote: or.. better yet. if i do a php - time(), i get a unix_timestamp var. how do you guys store this in mysql. you can't simply do an insert into a mysql/timestamp var. so how do you convert it? I don't convert it. I store the UNIX timestamp in an INT(11) column. also, once you

RE: [PHP] mysql/php date functions..

2005-09-26 Thread Chris W. Parker
John Nichel mailto:[EMAIL PROTECTED] on Monday, September 26, 2005 12:43 PM said: I don't convert it. I store the UNIX timestamp in an INT(11) column. This is going to be a basic question I'm sure but why INT and not VARCHAR? Is it simply because a timestamp is a number? Chris. -- PHP

Re: [PHP] mysql/php date functions..

2005-09-26 Thread Kristen G. Thorson
- the php var? thanks bruce -Original Message- From: bruce [mailto:[EMAIL PROTECTED] Sent: Monday, September 26, 2005 12:38 PM To: 'John Nichel'; php-general@lists.php.net Subject: RE: [PHP] mysql/php date functions.. so you play with the time/date vars on the php side, and then simply

Re: [PHP] mysql/php date functions..

2005-09-26 Thread John Nichel
Chris W. Parker wrote: John Nichel mailto:[EMAIL PROTECTED] on Monday, September 26, 2005 12:43 PM said: I don't convert it. I store the UNIX timestamp in an INT(11) column. This is going to be a basic question I'm sure but why INT and not VARCHAR? Is it simply because a timestamp is

RE: [PHP] mysql/php date functions..

2005-09-26 Thread Chrome
] Sent: 26 September 2005 19:46 To: 'John Nichel'; php-general@lists.php.net Subject: RE: [PHP] mysql/php date functions.. john... that appears to be it!! although i would have assumes it would have done a most significant bit fill with 0's... so my question also comes down to .. do i use the php

[PHP] mysql/php date functions..

2005-09-26 Thread info
Hello Bruce, While the date functions are well documented - http://php.net/date - here is a little example to manipulate the date with php, rather than mysql: // set the new expiry date // DATE FUNCTIONS FOR THE EXPIRY MODULE // first perform date arithmetic $listingExpiry = mktime

[PHP] date parsing

2005-09-13 Thread Philippe Reynolds
Greetings all, I am trying to find a function or a way to parse a date that has the following format 2005124 or 20051204. When I have a date that has a single digit (ie month, day) all the date/time function seem to go bizarre. When it is a full 8 digit string everything is fine. When

RE: [PHP] date parsing

2005-09-13 Thread Jim Moseby
Greetings all, I am trying to find a function or a way to parse a date that has the following format 2005124 or 20051204. When I have a date that has a single digit (ie month, day) all the date/time function seem to go bizarre. When it is a full 8 digit string everything is fine.

Re: [PHP] date parsing

2005-09-13 Thread Dragan Stanojevic - Nevidljivi
Philippe Reynolds wrote: Greetings all, I am trying to find a function or a way to parse a date that has the following format 2005124 or 20051204. Well, the truth is, computers are stupid, and you need to explain this kind of date format to him by rewriting such date in a way that a

Re: [PHP] date parsing

2005-09-13 Thread Philippe Reynolds
Much appreciated all, I was kindda hopping that I missed something, some mysterious function... My solution to this is: if a value like 2005416 to ignore it and only look for 2005/4/16 or 20050416. Cheers Phil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] date of file?

2005-09-11 Thread sub
In addition to reading the names of the files in a directory, I also need to read the date the file was modified. Right now I've got this: if ($handle = opendir($path)) { $b=0; while (false !== ($file[$b] = readdir($handle))) { $b++; } closedir($handle); } What

Re: [PHP] Date/Time Display for recurring monthly event

2005-09-11 Thread Burhan Khalid
[EMAIL PROTECTED] wrote: Having a heck of time getting anything to work, can anyone make a suggestion to the following. I need a webpage that displays 5 recurring meeting dates, i.e. the second Wednesday, Thursday, and Friday of each month in five different locations. ?php echo Current

Re: [PHP] Date/Time Display for recurring monthly event

2005-09-11 Thread Burhan Khalid
, Burhan [EMAIL PROTECTED] -Original Message- From: Burhan Khalid [mailto:[EMAIL PROTECTED] Sent: Sunday, September 11, 2005 6:55 AM To: [EMAIL PROTECTED] Cc: php-general@lists.php.net Subject: Re: [PHP] Date/Time Display for recurring monthly event [EMAIL PROTECTED] wrote: Having

[PHP] date and time conversion

2005-09-11 Thread babu
Hi, how to convert DD.MM.YYand HH:MM:SS into mysql date( '-MM-DD' ) and time format. I think the time is same as HH:MM:SS. Are there any php built in functions , or need to convert them using regular expressions. thanks babu - How

Re: [PHP] date and time conversion

2005-09-11 Thread Burhan Khalid
babu wrote: Hi, how to convert DD.MM.YYand HH:MM:SS into mysql date( '-MM-DD' ) and time format. I think the time is same as HH:MM:SS. [EMAIL PROTECTED] ~ $ php -r 'echo date(Y-m-d,strtotime(str_replace(.,/,12.12.05))).\n;' 2005-12-12 Hope that helps :) See http://php.net/date

[PHP] Date/Time Display for recurring monthly event

2005-09-10 Thread [EMAIL PROTECTED]
Having a heck of time getting anything to work, can anyone make a suggestion to the following. I need a webpage that displays 5 recurring meeting dates, i.e. the second Wednesday, Thursday, and Friday of each month in five different locations. Is there an easy (meaning code only, without using a

[PHP] date field

2005-08-10 Thread John Taylor-Johnston
I have a field 'updated' How can I tell if the date is older than 1 year ago (or should I think of 365 days)? `updated` date NOT NULL default '1999-12-12' I've looked at: http://ca3.php.net/manual/en/function.getdate.php Thanks, John -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] date field

2005-08-10 Thread Jasper Bryant-Greene
John Taylor-Johnston wrote: I have a field 'updated' How can I tell if the date is older than 1 year ago (or should I think of 365 days)? `updated` date NOT NULL default '1999-12-12' From the description you gave it looks like you're using a DBMS to store the date. If it's MySQL, then just

Re: [PHP] Date confusion

2005-08-01 Thread Burhan Khalid
On Jul 28, 2005, at 9:28 AM, Linda H wrote: Hi, I must admit I am surprised at the paucity of date and time functions in PHP. I have a date stored in a MySQL database in field of datatype date. PHP doesn't seem to have a function I can use to format it for print. I tried the following

[PHP] Date confusion

2005-07-27 Thread Linda H
Hi, I must admit I am surprised at the paucity of date and time functions in PHP. I have a date stored in a MySQL database in field of datatype date. PHP doesn't seem to have a function I can use to format it for print. I tried the following but regardless of the value in the date field, it

Re: [PHP] Date confusion

2005-07-27 Thread Rasmus Lerdorf
Linda H wrote: Hi, I must admit I am surprised at the paucity of date and time functions in PHP. I have a date stored in a MySQL database in field of datatype date. PHP doesn't seem to have a function I can use to format it for print. I tried the following but regardless of the value in

RE: [PHP] Date confusion

2005-07-27 Thread Rob Agar
hi Linda I must admit I am surprised at the paucity of date and time functions in PHP. You may want to check out the PEAR Date class: http://pear.php.net/package/Date Rob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Date Handling Recommendations

2005-07-21 Thread JM
Hi all, I need to manage some records with dates. mmdd I'm putting select options breaking the three up in numeric pull downs. no problem gathering and storing the data in my mysql db as integers then posting them for existing records etc. i know their is a datetime datatype but it doesnt

Re: [PHP] Date Handling Recommendations

2005-07-21 Thread Philip Hallstrom
Hi all, I need to manage some records with dates. mmdd I'm putting select options breaking the three up in numeric pull downs. no problem gathering and storing the data in my mysql db as integers then posting them for existing records etc. i know their is a datetime datatype but it doesnt

RE: [PHP] Date Handling Recommendations

2005-07-21 Thread Jim Moseby
Hi all, I need to manage some records with dates. mmdd I'm putting select options breaking the three up in numeric pull downs. no problem gathering and storing the data in my mysql db as integers then posting them for existing records etc. i know their is a datetime datatype but it

Re: [PHP] Date Handling Recommendations

2005-07-21 Thread Edward Vermillion
Jim Moseby wrote: Hi all, I need to manage some records with dates. mmdd I'm putting select options breaking the three up in numeric pull [snip] For instance, what would you have to do to get the day of the week for a day 66 days prior to the stored date? If your date was stored in a

Re: [PHP] Date Handling Recommendations

2005-07-21 Thread JM
thanks all. i just made the changes and its working smooth. i remember having a bunch of drama trying to use DATE data type...oh well, i just needed something to get me off my butt haha thanks again On 7/21/05, Philip Hallstrom [EMAIL PROTECTED] wrote: Hi all, I need to manage some records

Re: [PHP] Date function and MySQL

2005-07-20 Thread kalinga
this seems pretty interesting, i'm tring to write a code in php to get those two outputs, but bit confused in counting weeks. could somebody clear me.. what is the first *date* of the first week of year 2005? is it saturday jan 1st 2005 (assuming first week starts from jan 1 of any year) or is

Re: [PHP] Date function and MySQL

2005-07-20 Thread kalinga
Hi all. I have the week number (for example, this is the 29th week of the year and it begins on 7/17/05). Does anyone know how to obtain the first (and maybe the last) date of the week if you only know the week number of the year? Would it be better for me to obtain this in PHP

Re: [PHP] Date function and MySQL

2005-07-19 Thread Arno Coetzee
Philip Thompson wrote: Hi all. I have the week number (for example, this is the 29th week of the year and it begins on 7/17/05). Does anyone know how to obtain the first (and maybe the last) date of the week if you only know the week number of the year? Would it be better for me to

[PHP] Date function and MySQL

2005-07-18 Thread Philip Thompson
Hi all. I have the week number (for example, this is the 29th week of the year and it begins on 7/17/05). Does anyone know how to obtain the first (and maybe the last) date of the week if you only know the week number of the year? Would it be better for me to obtain this in PHP or MySQL?

Re: [PHP] date() problem

2005-07-07 Thread Kristen G. Thorson
Philip Hallstrom wrote: of leap years between the two dates. Leap years occur every 4 years, and 17 / 4 = 4.25, so there were 4 leap years between 7/6/88 and 7/6/05 and Just to nitpick... :-) http://en.wikipedia.org/wiki/Leap_year The Gregorian calendar adds an extra day to February,

Re: [PHP] date() problem

2005-07-07 Thread Ryan A
Hey Richard, Thanks, you've pulled my butt outa the fire again :-) Cheers, Ryan On 7/6/2005 10:59:36 PM, Richard Lynch ([EMAIL PROTECTED]) wrote: On Wed, July 6, 2005 12:07 pm, Ryan A said: I'm confused, this should give me the age as 17 instead of 16...but it does not...any ideas why?

[PHP] date() problem

2005-07-06 Thread Ryan A
Hi, I'm confused, this should give me the age as 17 instead of 16...but it does not...any ideas why? ?php print date(Y:m:d); $age=1988-07-06; $day1=strtotime($age); $day2 = strtotime(date(Y-m-d)); $dif_s = ($day2-$day1); $dif_d = ($dif_s/60/60/24); $age = floor(($dif_d/365.24)); echo $age; ?

Re: [PHP] date() problem

2005-07-06 Thread Edward Vermillion
On Jul 6, 2005, at 2:07 PM, Ryan A wrote: Hi, I'm confused, this should give me the age as 17 instead of 16...but it does not...any ideas why? ?php print date(Y:m:d); $age=1988-07-06; $day1=strtotime($age); $day2 = strtotime(date(Y-m-d)); $dif_s = ($day2-$day1); $dif_d =

Re: [PHP] date() problem

2005-07-06 Thread Edward Vermillion
On Jul 6, 2005, at 2:35 PM, Edward Vermillion wrote: On Jul 6, 2005, at 2:07 PM, Ryan A wrote: Hi, I'm confused, this should give me the age as 17 instead of 16...but it does not...any ideas why? ?php print date(Y:m:d); $age=1988-07-06; $day1=strtotime($age); $day2 =

Re: [PHP] date() problem

2005-07-06 Thread Richard Lynch
On Wed, July 6, 2005 12:07 pm, Ryan A said: I'm confused, this should give me the age as 17 instead of 16...but it does not...any ideas why? ?php print date(Y:m:d); $age=1988-07-06; $day1=strtotime($age); $day2 = strtotime(date(Y-m-d)); $dif_s = ($day2-$day1); $dif_d =

Re: [PHP] date() problem

2005-07-06 Thread Kristen G. Thorson
Ryan A wrote: Hi, I'm confused, this should give me the age as 17 instead of 16...but it does not...any ideas why? ?php print date(Y:m:d); $age=1988-07-06; $day1=strtotime($age); $day2 = strtotime(date(Y-m-d)); $dif_s = ($day2-$day1); $dif_d = ($dif_s/60/60/24); $age =

Re: [PHP] date() problem

2005-07-06 Thread Edward Vermillion
On Jul 6, 2005, at 3:59 PM, Richard Lynch wrote: 365.24 is an appoximation. Sooner or later, it's gonna bit you in the butt. If you want somebody's age accurately, you're probably going to have to do it the hard way. Something like this might work: ?php $DOB = 1988-07-06; $now =

Re: [PHP] date() problem

2005-07-06 Thread Philip Hallstrom
of leap years between the two dates. Leap years occur every 4 years, and 17 / 4 = 4.25, so there were 4 leap years between 7/6/88 and 7/6/05 and Just to nitpick... :-) http://en.wikipedia.org/wiki/Leap_year The Gregorian calendar adds an extra day to February, making it 29 days long, in

Re: [PHP] date() problem

2005-07-06 Thread Edward Vermillion
On Jul 6, 2005, at 4:44 PM, Philip Hallstrom wrote: of leap years between the two dates. Leap years occur every 4 years, and 17 / 4 = 4.25, so there were 4 leap years between 7/6/88 and 7/6/05 and Just to nitpick... :-) http://en.wikipedia.org/wiki/Leap_year The Gregorian calendar adds

Re: [PHP] date() problem

2005-07-06 Thread Edward Vermillion
On Jul 6, 2005, at 5:17 PM, Edward Vermillion wrote: On Jul 6, 2005, at 4:44 PM, Philip Hallstrom wrote: of leap years between the two dates. Leap years occur every 4 years, and 17 / 4 = 4.25, so there were 4 leap years between 7/6/88 and 7/6/05 and Just to nitpick... :-)

Re: [PHP] date() problem

2005-07-06 Thread Edward Vermillion
On Jul 6, 2005, at 5:31 PM, Edward Vermillion wrote: On Jul 6, 2005, at 5:17 PM, Edward Vermillion wrote: On Jul 6, 2005, at 4:44 PM, Philip Hallstrom wrote: of leap years between the two dates. Leap years occur every 4 years, and 17 / 4 = 4.25, so there were 4 leap years between 7/6/88

[PHP] date problem

2005-06-28 Thread Mario netMines
Hi all I have a database that holds car rental info DB: carrental_from (datetime field) carrental_to (datetime field) carrental_price (datetime field) [rates are per hour] The values I have are like: -00-00 00:00:00,-00-00 07:00:00,10 (all year around 00:00-07:00) -00-00

Re: [PHP] $date(l-m);

2005-06-05 Thread Jochem Maas
John Taylor-Johnston wrote: $mydata-lastinsalled = 2004-05; take a good look at mktime(); How can I determne if $mydata-lastinsalled is one year or more older than the current $date(l-m); Anyting simple and over looked? I have been browsing the manual::

[PHP] $date(l-m);

2005-06-04 Thread John Taylor-Johnston
$mydata-lastinsalled = 2004-05; How can I determne if $mydata-lastinsalled is one year or more older than the current $date(l-m); Anyting simple and over looked? I have been browsing the manual:: http://ca.php.net/manual/en/function.strtotime.php http://ca.php.net/manual/en/function.date.php

Re: [PHP] $date(l-m);

2005-06-04 Thread Sebastian
is it possible for $mydata-lastinsalled to have -MM-DD format? ie: 2004-05-31 you can use strtotime to convert it to unix timestamp to compare...something like this: $stamp = strtotime('2004-06-31'); // $mydata-lastinsalled if($stamp = strtotime('1 year ago')) { echo 'less than 1

[PHP] Date class

2005-04-19 Thread Devraj Mukherjee
Everyone, Do you know of any decent Date/Time handling classes? We require the following functionality 1. Date's prior to 1970 handled (not reliant on the PHP date) 2. add/subtract days to/from a date 3. subtract two dates returning number of days Any pointers are welcome. Thanks for your time

Re: [PHP] Date class

2005-04-19 Thread Mattias Thorslund
Devraj Mukherjee wrote: Everyone, Do you know of any decent Date/Time handling classes? We require the following functionality 1. Date's prior to 1970 handled (not reliant on the PHP date) 2. add/subtract days to/from a date 3. subtract two dates returning number of days Any pointers are welcome

RE: [PHP] Date class

2005-04-19 Thread Rob Agar
Matthias wrote: Have you looked at the PEAR Date class? http://pear.php.net/package/Date PEAR Date is good - I use it a lot - but watch out for this bug if you're running on Windows http://pear.php.net/bugs/bug.php?id=2344 basically, there's some getenv/putenv trickery in the

[PHP] Date time simplicity gotten out of hand

2005-04-09 Thread Ryan A
Hey, I thought this would be simple and just a few mins of programming but along the way...i have managed to confuse myself ;-D I have 2 field in my table users_online: present_date_time datetime expires_in datetime for present_date_time I am using now() to insert but for expires_in I need to

Re: [PHP] Date time simplicity gotten out of hand

2005-04-09 Thread Greg Donald
On Apr 9, 2005 12:35 PM, Ryan A [EMAIL PROTECTED] wrote: Hey, I thought this would be simple and just a few mins of programming but along the way...i have managed to confuse myself ;-D I have 2 field in my table users_online: present_date_time datetime expires_in datetime for

Re: [PHP] Date time simplicity gotten out of hand

2005-04-09 Thread Ryan A
On 4/9/2005 7:28:34 PM, Greg Donald ([EMAIL PROTECTED]) wrote: On Apr 9, 2005 12:35 PM, Ryan A [EMAIL PROTECTED] wrote: Hey, I thought this would be simple and just a few mins of programming but along the way...i have managed to confuse myself ;-D I have 2 field in my table

[PHP] date() function help

2005-03-16 Thread John Eggen
I am writing an application to allow users to enter weekly data and am storing the data based on the year and the ISO week number. The data will be reported on a monthly basis and therefore I need a way to find the ISO week number for the first full week of the month (Monday-Sunday) and the ISO

[PHP] date of the end of support (security updates)

2005-03-15 Thread zdust
Hi i am searching the date of the end of support for the different versions of php where can i find them? thx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date of the end of support (security updates)

2005-03-15 Thread Jochem Maas
[EMAIL PROTECTED] wrote: Hi i am searching the date of the end of support for the different versions of php there is no support as such. php4 is pretty much bugfix only. all the new work is being focused on php5. php3? (cue trumpets, cue 70's yellow, scrolling text, 'once a upon a time, long long

[PHP] Date() reporting wrong on OS X server intermittently

2005-02-17 Thread Rowan Hick
Hi There, I have an app which is installed across a dozen odd organisations, and one this week which is running on an OS X Xserve machine. Intermittently this week the PHP app has been seeing the wrong time. Shifting 12hrs at a time. The IT administrator who runs the box says that it's all

Re: [PHP] Date() reporting wrong on OS X server intermittently

2005-02-17 Thread Brent Baisley
The 12 hours seems suspicious to me since it's the difference between AM and PM. My other guess would be that it's grabbing Greenwich time, but it doesn't look like your offset from GMT is twelve hours. On Feb 17, 2005, at 4:12 PM, Rowan Hick wrote: Hi There, I have an app which is installed

Re: [PHP] Date() reporting wrong on OS X server intermittently

2005-02-17 Thread Rowan Hick
It could be flicking between GMT and local time, local time is 13 hrs difference. There's nothing on the server that would be changing an environment variable for the PHP app, so I'm pretty much ruling out interference from that. I still keep coming back to the server clock must be wrong but the

Re: [PHP] Date Update

2005-02-04 Thread John Nichel
Everybody sent a return receipt, right? ;) -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] [suspicious - maybe spam] Re: [PHP] Date Update

2005-02-04 Thread Richard Lynch
Adi Pramadi wrote: I'm new in PHP programing, and i need a way to add date in php. here is the sample If today is 29/01/2005 (dd/mm/yy) and i need to make an apointment for another 10 days the date recorded sould be 08/02/2005 and not 39/01/2005 is there a way to do it in just like in asp

[PHP] Date Update

2005-02-03 Thread Adi Pramadi
Dear Friends, I'm new in PHP programing, and i need a way to add date in php. here is the sample If today is 29/01/2005 (dd/mm/yy) and i need to make an apointment for another 10 days the date recorded sould be 08/02/2005 and not 39/01/2005 is there a way to do it in just like in asp (add

[PHP] Date ranges

2005-01-24 Thread Mikey
Hi NG, I have a page that is for booking attendance to events, and instead of using a date picker, I want to display drop-down selects which cover the ranges of dates that the event is occurring at. My question is, is there an easy way to determine the dates in between the date from and to that

<    1   2   3   4   5   6   7   8   9   10   >