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
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
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
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);
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
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
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
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
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
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
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,
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
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
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:
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
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
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
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 =
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
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
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
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
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
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
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
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
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
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
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
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
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:
[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
,
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
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
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
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
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
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
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
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
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
What are you trying to do? Compare dates from where to what? To the
current time, to times in a database???
strtotime() and UNIX_TIMESTAMP() are probably going to be part of your
solution, but I don't know what your doing.
---John Holmes...
-Original Message-
From: 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
() - 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
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
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.
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) . . .
It is much easier to use the mysql DATE_FORMAT() function to format your
dates when retrieving directly from the data base. You do not have to
convert to a UNIX time stamp and all that other stuff.
Your select statement should look something like:
$date_format_long=%d:%m:%y at %T;
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
processing) index.php, know what i mean?
jack
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 11, 2001 1:01 PM
To:
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
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
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
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
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
I think the best way to handle this is not to care what it looks like in the
database. Store your dates as UNIX timestamps, and then they are easy to do
calculations on and/or convert to any date format you like for displaying in
your pages.
Read up on date() and mktime() for more info (there
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 the best way to handle
this hugely messed up first time round...
search for one of my posts a few months ago where I was passing a string to
the date function if you fancy a chuckle)
Cheers
Jon
-Original Message-
From: Jack Sasportas [mailto:[EMAIL PROTECTED]]
Sent: 08 May 2001 17:46
To: php
Subject: Re: [PHP
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.
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
//
It may also be relevant that the "T" format string for the date() function
also reports GMT, even though I've set my system timezone to EDT. The
command "date" in FreeBSD also reports the time in EDT.
-Original Message-
From: Duke [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL
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
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
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'
63 matches
Mail list logo