Re: [PHP] date time problem

2013-10-07 Thread Jim Giner
On 10/6/2013 11:21 PM, Romain CIACCAFAVA wrote: An easier way to do that would be using the diff() method of a DateTime object on another. Regards Romain Ciaccafava Romain - you were so right. A little less calculating to be done and I got the result I wished. For anyone interested here's

[PHP] date time problem

2013-10-06 Thread Jim Giner
I always hate dealing with date/time stuff in php - never get it even close until an hour or two goes by anyway I have this: // get two timestamp values $exp_time = $_COOKIE[$applid.expire]; $curr_time = time(); // get the difference $diff = $exp_time - $curr_time; // produce a display

Re: [PHP] date time problem

2013-10-06 Thread Farzan Dalaee
You should use gmdate() if you want to how many hours left to expire $time_left = gmdate(H:i:s,$diff); Best Regards Farzan Dalaee On Oct 7, 2013, at 1:49, Jim Giner jim.gi...@albanyhandball.com wrote: I always hate dealing with date/time stuff in php - never get it even close until an

Re: [PHP] date time problem

2013-10-06 Thread Jim Giner
On 10/6/2013 6:36 PM, Farzan Dalaee wrote: You should use gmdate() if you want to how many hours left to expire $time_left = gmdate(H:i:s,$diff); Best Regards Farzan Dalaee On Oct 7, 2013, at 1:49, Jim Giner jim.gi...@albanyhandball.com wrote: I always hate dealing with date/time stuff in

Re: [PHP] date time problem

2013-10-06 Thread Farzan Dalaee
Try this please gmdate(H:i:s, $diff%86400) Best Regards Farzan Dalaee On Oct 7, 2013, at 2:12, Jim Giner jim.gi...@albanyhandball.com wrote: On 10/6/2013 6:36 PM, Farzan Dalaee wrote: You should use gmdate() if you want to how many hours left to expire $time_left = gmdate(H:i:s,$diff);

Re: [PHP] date time problem

2013-10-06 Thread Jim Giner
On 10/6/2013 6:49 PM, Farzan Dalaee wrote: Try this please gmdate(H:i:s, $diff%86400) Best Regards Farzan Dalaee On Oct 7, 2013, at 2:12, Jim Giner jim.gi...@albanyhandball.com wrote: On 10/6/2013 6:36 PM, Farzan Dalaee wrote: You should use gmdate() if you want to how many hours left

Re: [PHP] date time problem

2013-10-06 Thread Farzan Dalaee
Its so freaky Best Regards Farzan Dalaee On Oct 7, 2013, at 2:29, Jim Giner jim.gi...@albanyhandball.com wrote: On 10/6/2013 6:49 PM, Farzan Dalaee wrote: Try this please gmdate(H:i:s, $diff%86400) Best Regards Farzan Dalaee On Oct 7, 2013, at 2:12, Jim Giner

Re: [PHP] date time problem

2013-10-06 Thread Jonathan Sundquist
This should help you out http://stackoverflow.com/questions/365191/how-to-get-time-difference-in-minutes-in-php On Oct 6, 2013 6:07 PM, Farzan Dalaee farzan.dal...@gmail.com wrote: Its so freaky Best Regards Farzan Dalaee On Oct 7, 2013, at 2:29, Jim Giner jim.gi...@albanyhandball.com

Re: [PHP] date time problem

2013-10-06 Thread Aziz Saleh
Jim, The date method takes in a timestamp (not seconds away). You have the seconds, you will need to manually convert those seconds to what you desire (minutes = seconds / 60), (hours = minutes / 60), etc.. Aziz On Sun, Oct 6, 2013 at 7:07 PM, Farzan Dalaee farzan.dal...@gmail.comwrote: Its

Re: [PHP] date time problem

2013-10-06 Thread Jim Giner
Look at my code. The inputs are all timestamps so date should work, no? My question why am i getting an hour value in this case? jg On Oct 6, 2013, at 7:14 PM, Aziz Saleh azizsa...@gmail.com wrote: Jim, The date method takes in a timestamp (not seconds away). You have the seconds, you

Re: [PHP] date time problem

2013-10-06 Thread Aziz Saleh
The resulting subtraction is not a valid timestamp, but rather the difference between the two timestamps in seconds . The resulting diff can be 1 if the timestamps are 1 seconds apart. The linkhttp://stackoverflow.com/questions/365191/how-to-get-time-difference-in-minutes-in-phpJonathan sent out

Re: [PHP] date time problem

2013-10-06 Thread Ashley Sheridan
On Sun, 2013-10-06 at 19:14 -0400, Aziz Saleh wrote: Jim, The date method takes in a timestamp (not seconds away). You have the seconds, you will need to manually convert those seconds to what you desire (minutes = seconds / 60), (hours = minutes / 60), etc.. Aziz On Sun, Oct 6,

Re: [PHP] date time problem

2013-10-06 Thread Jim Giner
On 10/6/2013 7:40 PM, Aziz Saleh wrote: The resulting subtraction is not a valid timestamp, but rather the difference between the two timestamps in seconds . The resulting diff can be 1 if the timestamps are 1 seconds apart. The

Re: [PHP] date time problem

2013-10-06 Thread Jim Giner
On 10/6/2013 7:55 PM, Ashley Sheridan wrote: On Sun, 2013-10-06 at 19:14 -0400, Aziz Saleh wrote: Jim, The date method takes in a timestamp (not seconds away). You have the seconds, you will need to manually convert those seconds to what you desire (minutes = seconds / 60), (hours = minutes

Re: [PHP] date time problem

2013-10-06 Thread Romain CIACCAFAVA
An easier way to do that would be using the diff() method of a DateTime object on another. Regards Romain Ciaccafava Le 7 oct. 2013 à 03:10, Jim Giner jim.gi...@albanyhandball.com a écrit : On 10/6/2013 7:55 PM, Ashley Sheridan wrote: On Sun, 2013-10-06 at 19:14 -0400, Aziz Saleh wrote:

[PHP] date time late or lagging

2009-04-28 Thread Andrew Williams
hi all, $dateNow = date('Y-m-d H:i:s'); echo pstrong.$dateNow ./strong/p; can some see why the date time is lagging or late by 30 minutes from the server time even when server time are correct

Re: [PHP] date time late or lagging RESOLVED

2009-04-28 Thread Andrew Williams
On Tue, Apr 28, 2009 at 3:45 PM, Andrew Williams andrew4willi...@gmail.comwrote: hi all, $dateNow = date('Y-m-d H:i:s'); echo pstrong.$dateNow ./strong/p; can some see why the date time is lagging or late by 30 minutes from the server time even when server time are correct -- Best

Re: [PHP] Date/time format?

2007-04-02 Thread Zoltán Németh
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: snip (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

Re: [PHP] Date/time format?

2007-03-30 Thread Jason Pruim
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

Re: [PHP] Date/time format?

2007-03-30 Thread Jason Pruim
On Mar 29, 2007, at 4:52 PM, Zoltán Németh wrote: snip (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 =

Re: [PHP] Date/time format?

2007-03-29 Thread Jason Pruim
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

Re: [PHP] Date/time format?

2007-03-29 Thread Zoltán Németh
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 pet

Re: [PHP] Date/time format?

2007-03-29 Thread Roberto Mansfield
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. here

Re: [PHP] Date/time format?

2007-03-29 Thread Jim Lucas
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

Re: [PHP] Date/time format?

2007-03-29 Thread Jim Lucas
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

[PHP] Date/time format?

2007-03-28 Thread Jason Pruim
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

Re: [PHP] Date/time format?

2007-03-28 Thread Brad Bonkoski
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

Re: [PHP] Date/time format?

2007-03-28 Thread Travis Doherty
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

Re: [PHP] Date/time format?

2007-03-28 Thread Zoltán Németh
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 how to

Re: [PHP] Date/time format?

2007-03-28 Thread Travis Doherty
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 attempting to

RE: [PHP] Date/time format?

2007-03-28 Thread Brad Fuller
Jason 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

Re: [PHP] Date/time format?

2007-03-28 Thread Zoltán Németh
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 string is in in a

Re: [PHP] Date time Comparison

2006-04-19 Thread John Wells
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 the

[PHP] Date time Comparison

2006-04-18 Thread Murtaza Chang
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){

Re: [PHP] Date time Comparison

2006-04-18 Thread Richard Lynch
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:

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/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 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/Time problem

2003-06-27 Thread Sparky Kopetzky
Well, I got the time displaying sort of right but have a length problem. See, using %T doesn't work in date() but %Z does but it returns a very long string 'Mountain Daylight Time' when all I want is 'MDT'. Is there a way around this problem other than having to edit the string date() returns??

Re: [PHP] Date/Time problem

2003-06-27 Thread Adam Voigt
echo(date('T')); Works fine for me. On Fri, 2003-06-27 at 13:03, Sparky Kopetzky wrote: Well, I got the time displaying sort of right but have a length problem. See, using %T doesn't work in date() but %Z does but it returns a very long string 'Mountain Daylight Time' when all I want is

[PHP] OOPS!!! [PHP] Date/Time problem

2003-06-27 Thread Sparky Kopetzky
Opps! I meant strftime() as I have to pass timestamp from a file. Sparky - Original Message - From: Adam Voigt [EMAIL PROTECTED] To: Sparky Kopetzky [EMAIL PROTECTED] Cc: PHP General [EMAIL PROTECTED] Sent: Friday, June 27, 2003 11:07 Subject: Re: [PHP] Date/Time problem echo(date('T

[PHP] Date/Time Logic

2003-02-19 Thread Pushpinder Singh Garcha
Hello Everyone, My php/mysql application needs to keep track of the first time that a User logs on to the site. Afterwards the User should be allowed either 3 days / 3 months/1 year of access to the site. Once the stipulated time period is over the system should invalidate the login of the

Re: [PHP] Date/Time Logic

2003-02-19 Thread Brent Baisley
It sounds like you're asking for triggers, which are available yet. But you could setup a cron job to run every night to update the database. It would be no different than doing a nightly dump for backup. You could even have it email you the accounts that were closed and those that will be

Re: [PHP] Date/Time Logic

2003-02-19 Thread Justin French
I assume you talking about a logged in, validated user -- because there's no way to prevent a user from deleting their cookies, or changing their IP, or using a different computer to access the site. My only suggestion is that you create a user/pass login system, maintain it with sessions, and

RE: [PHP] Date Time

2002-09-22 Thread Don Read
On 21-Sep-2002 Patrick wrote: Hi,, my server is located in the US and i live in Sweden, so when i try to run the following command i get a 8hour diffrence,, anyone got any idea of how to solve this? date(Y-m-j) putenv('TZ=Europe/Stockholm'); mktime(0,0,0,1,1,1970); echo

[PHP] Date Time

2002-09-20 Thread Patrick
Hi,, my server is located in the US and i live in Sweden, so when i try to run the following command i get a 8hour diffrence,, anyone got any idea of how to solve this? date(Y-m-j) regards Patrick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Date Time

2002-09-20 Thread Tom Rogers
Hi, Saturday, September 21, 2002, 12:30:48 PM, you wrote: P Hi,, P my server is located in the US and i live in Sweden, so when i try to run P the following command i get a 8hour diffrence,, anyone got any idea of how P to solve this? P date(Y-m-j) P regards P Patrick A quick fix that

Re: [PHP] Date Time

2002-09-20 Thread Sascha Cunz
You have to add (or subtract) 28800 seconds to/from current time and use this as the 2nd input to date. echo date(Y-m-j, strtotime(now) + 28800); Sascha Hi,, my server is located in the US and i live in Sweden, so when i try to run the following command i get a 8hour diffrence,, anyone

[PHP] Date/Time...

2002-05-23 Thread Brian McGarvie
OK, give up.. been trying to compare dates in the format; 2002-05-23 12:19:34 I just cant workout how to compare, I've converted to a timestamp - but the resulting timestamp was wrong. Any help much appreciated... TIA... -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

RE: [PHP] Date/Time...

2002-05-23 Thread John Holmes
[mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 7:22 AM To: [EMAIL PROTECTED] Subject: [PHP] Date/Time... OK, give up.. been trying to compare dates in the format; 2002-05-23 12:19:34 I just cant workout how to compare, I've converted to a timestamp - but the resulting timestamp

RE: [PHP] Date/Time...

2002-05-23 Thread Brian McGarvie
elapsed: $dayspassed; any ideas? on-top of what you mentioned? -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED]] Sent: 23 May 2002 1:18 PM To: Brian McGarvie; [EMAIL PROTECTED] Subject: RE: [PHP] Date/Time... What are you trying to do? Compare dates from where

Re: [PHP] Date/Time...

2002-05-23 Thread 1LT John W. Holmes
() - INTERVAL $X DAY; Easy, eh? ---John Holmes... - Original Message - From: Brian McGarvie [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, May 23, 2002 8:27 AM Subject: RE: [PHP] Date/Time... I have an audit table which stores events like faile logins etc

[PHP] date(), time() different to system time

2002-02-05 Thread Anth Courtney
Hey guys, I'm running a RH7.2 box with apache 1.3.20 installed and php-4.1.1 installed as a DSO. Everything is working fine, except that the output from any date() or time() references is 16 hours behind the system time (and hwtime) on the machine. The machine gets its time from an ntp server

Re: [PHP] date(), time() different to system time

2002-02-05 Thread DL Neil
Hey Anth, Hey guys, =some of the better-looking amongst us are not guys (and then some of us are...) I'm running a RH7.2 box with apache 1.3.20 installed and php-4.1.1 installed as a DSO. Everything is working fine, except that the output from any date() or time() references is 16 hours

Re: [PHP] date(), time() different to system time

2002-02-05 Thread Anth Courtney
On Tue, 5 Feb 2002, DL Neil wrote: Hello DL, =some of the better-looking amongst us are not guys (and then some of us are...) Sorry! :) Check out the meaning of EST. Sixteen hours behind NSW, Australian time would make it New York time wouldn't it? *trumpet fanfare* Thanks for that.

Re: [PHP] Date time

2002-01-30 Thread DL Neil
Hello Torkil, I have a field in my mysql database containing datetime on the format -MM-DD HH:MM:SS (24-hour format) Now. I want to output this as follows: DD.MM.YY at HH:MM:SS Currently I do this by this function: function convert_datetime($in){ $return = substr($in,8,2) . . .

[PHP] Date time

2002-01-29 Thread Torkil Johnsen
Hello... I have a field in my mysql database containing datetime on the format -MM-DD HH:MM:SS (24-hour format) Now. I want to output this as follows: DD.MM.YY at HH:MM:SS Currently I do this by this function: function convert_datetime($in){ $return = substr($in,8,2) . . .

Re: [PHP] Date time

2002-01-29 Thread Dennis Moore
; $query=select DATE_FORMAT(date_field, '$date_format_long' ) as fmt_date from your_table; RTM at http://www.mysql.com Chapter 6 - Original Message - From: Torkil Johnsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 29, 2002 7:29 PM Subject: [PHP] Date time Hello

[PHP] date/time of current page

2001-09-11 Thread chip . wiegand
I want to put, into a footer include file, the last modified date of the current file being viewed. I have the following code that works when I hard code the file name - ? $dt=date(D, F d, Y g:i:s A, filemtime(index.php)); echo $dt; ? But of course that won't work as a footer for a site with

RE: [PHP] date/time of current page

2001-09-11 Thread Jack Dempsey
To: [EMAIL PROTECTED] Subject: [PHP] date/time of current page I want to put, into a footer include file, the last modified date of the current file being viewed. I have the following code that works when I hard code the file name - ? $dt=date(D, F d, Y g:i:s A, filemtime(index.php)); echo $dt

RE: [PHP] date/time of current page

2001-09-11 Thread Michael Geier, CDM Systems Admin
script language=javascript document.write('some text ' + document.lastmodified + ' some other text.'); /script -Original Message- From: Jack Dempsey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 11, 2001 4:42 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] date/time

RE: [PHP] date/time of current page

2001-09-11 Thread chip . wiegand
Jack Dempsey [EMAIL PROTECTED] on 09/11/2001 11:42:07 PM Internet mail from: To: [EMAIL PROTECTED], [EMAIL PROTECTED] cc: Subject: RE: [PHP] date/time of current page have you tried parsing out the name from $PHP_SELF? I would think that php wouldn't care if it gets 'index.php' or (some

RE: [PHP] date/time of current page

2001-09-11 Thread chip . wiegand
Michael Geier, CDM Systems Admin [EMAIL PROTECTED] on 09/11/2001 11:46:50 PM Internet mail from: To: Jack Dempsey [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] cc: Subject: RE: [PHP] date/time of current page script language=javascript document.write('some text

RE: [PHP] date/time of current page

2001-09-11 Thread Jack Dempsey
I'm not sure what you mean, but here is what I have tried - try this: ? echo date(m/d/y g:i:s A, filemtime(substr($PHP_SELF,strrpos($PHP_SELF,'/')+1))) ? jack -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

RE: [PHP] date/time of current page

2001-09-11 Thread chip . wiegand
Thankyou, that works fine. -- Chip Jack Dempsey [EMAIL PROTECTED] on 09/12/2001 12:03:20 AM Internet mail from: To: [EMAIL PROTECTED] cc: [EMAIL PROTECTED] Subject: RE: [PHP] date/time of current page I'm not sure what you mean, but here is what I have tried - try this: ? echo

[PHP] Date/Time Query Help

2001-07-24 Thread Shrout, Ryan
Okay, I need help with this one: I have a table with a column in the MySQL DATETIME format. (2001-07-24 13:02:02) I need a MySQL query that will select all the entries in it made within the last hour. I tried this, but it is not working correctly, what am I doing wrong? SELECT *

[PHP] Date Time Formatting ??

2001-05-08 Thread Jack Sasportas
OK I have read many examples, old posts etc, but I am looking for a detailed explanation as to how to do this. First is when I write to a mysql database using the now() function, the time stamp looks like so when I display the time back to the browser. 204:24:06 ( This should have been 12:24pm

RE: [PHP] Date Time Formatting ??

2001-05-08 Thread Jon Haworth
(there are loads of examples in the user notes). HTH Jon -Original Message- From: Jack Sasportas [mailto:[EMAIL PROTECTED]] Sent: 08 May 2001 17:28 To: php Subject: [PHP] Date Time Formatting ?? OK I have read many examples, old posts etc, but I am looking for a detailed explanation as to how

Re: [PHP] Date Time Formatting ??

2001-05-08 Thread Jack Sasportas
in the user notes). HTH Jon -Original Message- From: Jack Sasportas [mailto:[EMAIL PROTECTED]] Sent: 08 May 2001 17:28 To: php Subject: [PHP] Date Time Formatting ?? OK I have read many examples, old posts etc, but I am looking for a detailed explanation as to how to do this. First

RE: [PHP] Date Time Formatting ??

2001-05-08 Thread Jon Haworth
] Date Time Formatting ?? Here is what I am trying to do, but I get the wrong date: $t_data_array[1]=date(m/d/y,mysql_result($db_result,$db_record,'date')); Then I simply print the value in the arraythis date instead of 05/08/01 comes out 12/31/69 Thanks! Jon Haworth wrote: I think

RE: [PHP] Date Time Formatting ??

2001-05-08 Thread Don Read
On 08-May-01 Jack Sasportas wrote: snip The Goal is to have the Time stamp looking like 12:24 (military time OK) and the date 05-08-2001 or even 05-08-01. The MySQL db looks like so: date -00-00 time 00:00:00 I don't seem to really be able to vary the DB format.

[PHP] Date/Time Arithmetic

2001-04-11 Thread Erich Reimberg N.
Hello, Is it possible to do some arithmetic with time/date values in PHP? for example, to calculate: today + 1050 days. today - 7 days. etc. I mean, does PHP have functions to perform these operations? Thanks, Erich Reimberg. PS. I'm new to PHP, and I didn't find anything like

RE: [PHP] Date/Time Arithmetic

2001-04-11 Thread Boget, Chris
Is it possible to do some arithmetic with time/date values in PHP? for example, to calculate: today + 1050 days. today - 7 days. etc. I mean, does PHP have functions to perform these operations? $oneDay = 86400; // number of seconds in a day //

[PHP] date/time in wrong zone

2001-04-08 Thread Duke
I'm using php 4.0.4pl1on a FreeBSD system. When I use a php date/time function, it reports the time in GMT, however, I have the date on my FreeBSD system set to EDT. I can't figure out what the problem is here. The only thing I can think of is that when I compiled php, my system timezone was set

Re: [PHP] date/time in wrong zone

2001-04-08 Thread Duke
IL PROTECTED] [EMAIL PROTECTED] Date: April 9, 2001 12:00 AM Subject: [PHP] date/time in wrong zone I'm using php 4.0.4pl1on a FreeBSD system. When I use a php date/time function, it reports the time in GMT, however, I have the date on my FreeBSD system set to EDT. I can't figure out what the problem is h

[PHP] Date/Time from Unix timestamp

2001-01-24 Thread CDitty
Ok, I have looked at all my sources, including the manual and I cannot find any method of converting the Unix timestamp to a displayable date/time. I have probably just overlooked it each time, but all I can find are methods to convert the current date/time to a Unix timestamp. Can anyone

Re: [PHP] Date/Time from Unix timestamp

2001-01-24 Thread Hardy Merrill
CDitty [[EMAIL PROTECTED]] wrote: Ok, I have looked at all my sources, including the manual and I cannot find any method of converting the Unix timestamp to a displayable date/time. I have probably just overlooked it each time, but all I can find are methods to convert the current

Re: [PHP] Date/Time Formatting

2001-01-19 Thread Ignacio Vazquez-Abrams
On Fri, 19 Jan 2001, Jamie wrote: I'm fairly new to SQL and PHP and I'm haveing trouble useing the Date functions of Both Systems, so I'd be greatfull if someone can help. What I'm trying to do is have an 'administrator' be able to enter info through a form to a mySQL database. Then on a

Re: [PHP] Date/Time Formatting

2001-01-19 Thread Richard Lynch
Also I'd like to if possible to be able to enter and display the date in Australian / European Time format (DD,MM,) I'm currently entering it on the form using three text fields and then rearanging them to the Format in mySQL and indserting it as a string, but I don't know how to 'break'