Hello all,
I would like to know if anyone could help me with the following issue:
I have 6 variables, two holds a day, others the month and the last ones the year. They
are entered through drop-down-menus where the user selects day, month and year for
each date.
I would like to know the
Not mentioning that you could've taken a look at
http://www.php.net/manual/en/ref.datetime.php yourself, here goes:
$days_diff=(mktime(0,0,0,$month2,$day2,$year2)-mktime(0,0,0,$month2,$day2,$year2))/86400;
Bogdan
Carlos Fernando Scheidecker Antunes wrote:
Hello all,
I would like to know if
Well, actually
$days_diff=(mktime(0,0,0,$month2,$day2,$year2)-mktime(0,0,0,$month1,$day1,$year1))/86400;
but you probably got that... :-)
Bogdan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To
-GENERAL
Subject: [PHP] Date aritmetic
Importance: High
Hello all,
I would like to know if anyone could help me with the following issue:
I have 6 variables, two holds a day, others the month and the last ones the
year. They are entered through drop-down-menus where the user selects day,
month
: Thursday, January 03, 2002 2:20 PM
To: Carlos Fernando Scheidecker Antunes
Cc: PHP-GENERAL
Subject: Re: [PHP] Date aritmetic
Not mentioning that you could've taken a look at
http://www.php.net/manual/en/ref.datetime.php yourself, here goes:
$days_diff=(mktime(0,0,0,$month2,$day2,$year2)-mktime(0,0,0
Hi! =)
I'm doing a website that will be using a pay-per-month membership
program. There's a field for 'lastpaid' that holds the date the last
paid (sorry to state the obvious). My questions are these:
1) What would be the best way to format it so PHP can see if it's been
30 days since it was
Hi to all,
I'm using this to get date from mySQL database:
...
$p_datum = $row[mydatefield];
$mydate = getdate($p_datum);
$month = $mydate['month'];
$mday = $mydate['mday'];
$year = $mydate['year'];
..but I allways get 1/1/1970.
Can anybody help me?
--
PHP General Mailing List
what's your raw data. I mean, what is the value of
$row[mydatafield];
--- Max [EMAIL PROTECTED] wrote:
Hi to all,
I'm using this to get date from mySQL database:
...
$p_datum = $row[mydatefield];
$mydate = getdate($p_datum);
$month = $mydate['month'];
$mday = $mydate['mday'];
you could use the mySQL DATE_FORMAT() directly in your query:
SELECT DATE_FORMAT( mydatefield, '%m/%d/%Y ' ) as d_mydatefield from MyTable
At 11:23 PM 12/12/2001 +0100, you wrote:
Hi to all,
I'm using this to get date from mySQL database:
..
$p_datum = $row[mydatefield];
$mydate =
Why is this:
?php
$modified = stat(header.php);
echo Last Modified: .date(F j, Y, g:i a,$modified[9]);
?
returning this:
Last Modified: December 31, 1969, 7:00 pm
from this:
-rw-r--r-- 1 gfxdesi vuser 1196 Dec 11 09:22 header.php
Anyone?
--
PHP General Mailing List
2001 14:35
To: PHP Lists
Subject: [PHP] Date
Why is this:
?php
$modified = stat(header.php);
echo Last Modified: .date(F j, Y, g:i a,$modified[9]);
?
returning this:
Last Modified: December 31, 1969, 7:00 pm
from this:
-rw-r--r-- 1 gfxdesi vuser 1196 Dec 11 09:22 header.php
Anyone
What would be an easy what to format a date value into month day year??
I want to specially display a date stored in mysql in date format
-MM-DD
The manual says: string date (string format, int [timestamp])
I tried $FormattedDate = date(F y, Y,${StoredDate})
1999-04-15 spit out December
, December 10, 2001 8:35 PM
Subject: [PHP] Date formatting
What would be an easy what to format a date value into month day year??
I want to specially display a date stored in mysql in date format
-MM-DD
The manual says: string date (string format, int [timestamp])
I tried $FormattedDate
On Monday, December 10, 2001, at 09:35 PM, phantom wrote:
What would be an easy what to format a date value into month day year??
I want to specially display a date stored in mysql in date format
-MM-DD
The manual says: string date (string format, int [timestamp])
I tried
Here, play with this. dtAuctionStart is a MySQL date field, so substitute
your own connection and var.
Have fun - Miles Thompson
Some messing about with dates br
=br
?
echo $dtAuctionStart, br;
echo date (Y-m-d, $dtAuctionStart ), br;
//$strDate = $dtAuctionStart ;
Why is this:
?php
$modified = stat(header.php);
echo Last Modified: .date(F j, Y, g:i a,$modified[9]);
?
returning this:
Last Modified: December 31, 1969, 7:00 pm
from this:
-rw-r--r-- 1 gfxdesi vuser 1196 Dec 11 09:22 header.php
Anyone?
--
PHP General Mailing List
- Original Message -
From: Brian V Bonini [EMAIL PROTECTED]
To: PHP Lists [EMAIL PROTECTED]
Sent: Tuesday, December 11, 2001 3:43 PM
Subject: [PHP] Date
Try instead..
echo Last Modified: . date(j F Y H:i, filetime($your_file_path));
I don't know exactly what the stat() funciton
Hello,
I'm working on a project planning system and what i want to do is making a
sort of table structure with an overview form today till a month later. All
the projects that are between these dates must be viewed.
Right now i have the following questions:
- How can i determine how much days
Hi,
I am reading a date from an input in format 'DD-MM-' ex. 10-11-2001.
Now I want to add 3 months to the date. I have tested mktime and strftime
etc and no matter what I do I get the year as 1970. (Systemdate works
fine). How would I go about adding 3 months to a date in that format?
Hello,
I have 2 date string like this
$t1 = 2001-11-12 17:30:10;
$t2 = 2001-11-12 17:15:32;
I need to substracts the number of seconds from $t2 from $t1
(because after I have another script thats converts the number of seconds to
minutes, hours or days if necessary)
I tried: (but it does not
I have 2 date string like this
$t1 = 2001-11-12 17:30:10;
$t2 = 2001-11-12 17:15:32;
I need to substracts the number of seconds from $t2 from $t1
First, convert them to unix time format:
?
Function dateTextToUnix($string)
{
$year = substr($string, 0, 4);
$month =
] );
Martin T
-Original Message-
From: py [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 2:47 PM
To: [EMAIL PROTECTED]
Subject: [PHP] date conversion and calculation problem...
Hello,
I have 2 date string like this
$t1 = 2001-11-12 17:30:10;
$t2 = 2001-11-12 17:15:32;
I need
Hi Sundog,
Can help you with dates (but no, if you want that kind you'll definitely not be
wanting my advice...)
- Original Message -
I am trying to determine if todays date ($today) is within a week
($startcheck) of a given date ($dob). This is what I have so far.
$todaydate =
I am trying to determine if todays date ($today) is within a week
($startcheck) of a given date ($dob). This is what I have so far.
$todaydate = (date(Y-d-m));
$today = strtotime($todaydate);
// $today prior to strtotime = 2001-10-11
$startcheck = strtotime(2001-08-11);
$dob =
Hi,
I'm having a bit of a weird problem with the date() function. I am using
PostgreSQL to store guestbook entries and updating and displaying them with
Apache 1.3x and PHP4 on OpenBSD. The date information is being stored
correctly in PostgreSQL, but I'm using the date() function to format
For reference:
OS: OpenBSD 2.9
Web Server: Apache1.3.19
PHP Version: 4.0.6
My problem is that date() and all the other time functions return GMT instead
of localtime. system(date) returns the correct localtime. Those functions
used to return localtime since GMT. The problem seems to have
I have inserted the date into MySQL using now() in the query. However, when
I retrieve the using MySQL_Date_Format in the query the time is always
wrong. on the other hand, if I format the date using Date() in PHP it always
makes the date DEC 31 1969 at 700PM. Please Help
--
PHP General
Hello guys
I store date in my dbase in folliwing format 2001-08-27 22:24:07, how
can i convert this to timestamp and do manipulation
Thank You very muc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
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
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
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'm looping through a MSQL db pulling out the dates where I would like to
display the date and then the day of the week. The problem is that every
date returns the same day of the week, Wed. I checked the documentation and
it doesn't say anything about the expression only being executed once
Original message
From: Paul McGee [EMAIL PROTECTED]
Date: Thu, Aug 30, 2001 at 12:13:21PM -0400
Message-ID: [EMAIL PROTECTED]
Subject: [PHP] Date formatting in PHP 3.0
I'm looping through a MSQL db pulling out the dates where I would like to
display the date and then the day of the week
ssage-ID: [EMAIL PROTECTED]
Subject: [PHP] Date formatting in PHP 3.0
I'm looping through a MSQL db pulling out the dates where I would like
to
display the date and then the day of the week. The problem is that
every
date returns the same day of the week, Wed. I checked the documentation
and
it
Original message
From: Paul McGee [EMAIL PROTECTED]
Date: Thu, Aug 30, 2001 at 12:45:49PM -0400
Message-ID: [EMAIL PROTECTED]
Subject: Re: [PHP] Date formatting in PHP 3.0
Thanks, I knew it was something stupid!
However, the $dy = date (D, $row[0]) doesn't work.
/Original message
Reply
I am using PHP 4, I have a date which I am adding to a MYSQL db, I have that
bit sorted, I am trying to calculate an 2 expiry dates, one that is 1 year
and 11 months ahead of the 1st date and another that is 2 years ahead of the
1st date.
Any Ideas, I have seen lots of scripts for adding days
On Mon, Aug 20, 2001 at 12:12:15PM +0100, Peter Allum wrote:
I am using PHP 4, I have a date which I am adding to a MYSQL db, I have that
bit sorted, I am trying to calculate an 2 expiry dates, one that is 1 year
and 11 months ahead of the 1st date and another that is 2 years ahead of the
1st
Hello,
I'm pulling a date out of MySQL as 2001-10-18.
How do I make it print October 18 in php?
Thanks much
--Mike
__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
--
PHP
?php
$date = 2001-10-18;
$montharray = array(Jan, Feb, Mar, Apr, May, Jun, Jul, Aug,
Sep, Oct, Nov, Dec);
$datedata = explode(-, $date);
echo $montharray[$datedata[1]+1]. .$datedata[2]. .$datedata[0];
?
- Original Message -
From: Mike Mike [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent
I use
$date = explode(-, $msql_date);
$date = date(d F,mktime(0,0,0,$date[1],$date[2],$date[0]));
At 08:08 AM 8/15/01 -0700, Mike Mike wrote:
Hello,
I'm pulling a date out of MySQL as 2001-10-18.
How do I make it print October 18 in php?
Thanks much
--Mike
On Thu, 16 Aug 2001 00:38, Mike Mike wrote:
Hello,
I'm pulling a date out of MySQL as 2001-10-18.
How do I make it print October 18 in php?
Thanks much
--Mike
You could use the Mysql date functions to format it for you. If your date
field is called date and is a date type:
SELECT
On 16-Aug-2001 David Robley wrote:
On Thu, 16 Aug 2001 00:38, Mike Mike wrote:
Hello,
I'm pulling a date out of MySQL as 2001-10-18.
How do I make it print October 18 in php?
Thanks much
--Mike
You could use the Mysql date functions to format it for you. If your date
field is called
-Original Message-
From: Steve Brett [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 7:56 AM
To: [EMAIL PROTECTED]
Subject: [PHP] php date bug ?
hi,
i've got a calendar and i produce a month sort of outlook / filofax view
that shows the user's appointments for that month.
the way i
:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 8:33 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] php date bug ?
as far as i know adding 1 day to the day value of the timestamp will
increment the month as well.
adding i day to july 31st will give august 1st.
if you need it i'll send you my code
Just to throw one more unwelcome cat amongst the pigeons..
Different countries/time zones have summer time, I think almost all
countries do, but the actual days when they switch vary from country (yes
I
know, bloody nusiance isn't it?)
I know as an example of this theres about three weeks
of the year where new
york is 6 hours behing UK, and the rest its only 5.
HTH
- Original Message -
From: Johnny Nguyen [EMAIL PROTECTED]
To: Steve Brett [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, August 03, 2001 4:25 PM
Subject: RE: [PHP] php date bug ?
I'm in the exact same position
Do you mean something like:
$date = date(Y-m-d);
echo $date;
Mick
On Sat, 28 Jul 2001, colin wrote:
can anyone give me a work around for a PHP date function when used in
conjunction with a PHP include.
The code inside the include is printed but I do not know how to echo
can anyone give me a work around for a PHP date function when used in
conjunction with a PHP include.
The code inside the include is printed but I do not know how to echo the
date as the document has already been parsed once.
Any help would be appreciated. Please reply to [EMAIL PROTECTED]
many
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 *
Hi,
how do i check that the current date is the end of month ?
thanks in advance
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
hi,
how do i check that the current date is the end of month
Thanks in Advance
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
$todaydate = date(m);
$tomorrowdate = date(m,time() + 86400);
if($todaydate != $tomorrowdate){
echo Tomorrow is a new month;
}
- Original Message -
From: Yamin Prabudy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 23, 2001 5:27 PM
Subject: [PHP] date HELP !
hi
Hello Yamin,
Monday, July 23, 2001, 9:27:46 AM, you wrote:
YP hi,
YP how do i check that the current date is the end of month
YP Thanks in Advance
If you want to check how long is current month and use this value
later you can use this:
$month=(m); //can be like this depend on if you
: Yamin Prabudy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 23, 2001 5:27 PM
Subject: [PHP] date HELP !
hi,
how do i check that the current date is the end of month
Thanks in Advance
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL
Better still, use the date(t); to find out how many days are in the given
month. This part of the date function is a blessing, given the varying days
in months, and the fact that we've a leap year every four years.
James
Daniel Rezny [EMAIL PROTECTED] wrote in message
[EMAIL
Hi all,
I have a view containing a char value. I use select to_date(thoigian,'yy-mm-dd
hh24:mi:ss') from this view. But i can't see the time, it's only appear as
DD-MON-YY. Anybody could show me how to see the time.
Thanks you in advance.
Best regards,
BaDu
What is this On Mon, 4 Jan 1999, Duy B wrote:
On Mon, 4 Jan 1999, Duy B wrote:
Hi all,
I have a view containing a char value. I use select to_date(thoigian,'yy-mm-dd
hh24:mi:ss') from this view. But i can't see the time, it's only appear as
DD-MON-YY. Anybody could show me how to see the
Has anybody heard if this will affect PHP in any way?
Copied from the Unix Guru mailing list:
-=-=-=-=-=-=-=-=-=-=-=-
The unix time() value becomes
10 digits for the first time on
Sun Sep 9 01:46:40 2001
For the first time in modern
computer history, the timestamp
will be something
On 11-Jul-01 scott [gts] wrote:
Has anybody heard if this will affect PHP in any way?
Copied from the Unix Guru mailing list:
-=-=-=-=-=-=-=-=-=-=-=-
The unix time() value becomes
10 digits for the first time on
Sun Sep 9 01:46:40 2001
For the first time in modern
computer
mktime can be pretty useful :
$year = 2001;
$month = 6;
$day = 1;
print date('l',mktime(0,0,0,$month,$day,$year));
as it creates a unix timestamp, and date() appreciates that.
Regards,
Philip
On Mon, 25 Jun 2001, Tyler Longren wrote:
Hello,
I have something like this:
:58 AM
Subject: [PHP] date - day
Hello,
I have something like this:
$Month = 6;
$Year = 2001;
$Date = 1;
Is there any relatively simple way to get the day out of that? For
example,
the day for 6-1-2001 would be Friday.
Thanks,
Tyler
--
PHP General Mailing List (http://www.php.net
On Tue, 26 Jun 2001 00:28, Tyler Longren wrote:
Hello,
I have something like this:
$Month = 6;
$Year = 2001;
$Date = 1;
Is there any relatively simple way to get the day out of that? For
example, the day for 6-1-2001 would be Friday.
Thanks,
Tyler
If that info comes from a database,
date('l', mktime(0,0,0, $Month, $Day, $Year));
- Original Message -
From: Tyler Longren [EMAIL PROTECTED]
To: php-general [EMAIL PROTECTED]
Sent: 2001. jĂșnius 25. 16:58
Subject: [PHP] date - day
Hello,
I have something like this:
$Month = 6;
$Year = 2001;
$Date = 1
Hello,
I have something like this:
$Month = 6;
$Year = 2001;
$Date = 1;
Is there any relatively simple way to get the day out of that? For example,
the day for 6-1-2001 would be Friday.
Thanks,
Tyler
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL
(Y);
while($x 20)
{
$year = $year+1;
print($year . \n);
$x++;
}
?
Try that.
Tyler
-Original Message-
From: Jason Caldwell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 11:20 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Date (Year) .. adding..
I'm
I'm trying to figure out how to add to the year:
for($x=0; $x20; $x++)
{
$year = date(Y + $x);
print($year . \n);
}
I've tried several variations on the above and cannot get the year to come
out.
Any suggestions?
Thanks
Jason
--
PHP General Mailing List (http://www.php.net/)
To
?
$x=0;
$year = date(Y);
while($x 20)
{
$year = $year+1;
print($year . \n);
$x++;
}
?
Try that.
Tyler
-Original Message-
From: Jason Caldwell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 11:20 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Date (Year) .. adding
Hi,
Does anyone implement Date and Time Functions for PHP like MySQL?
http://www.mysql.com/doc/D/a/Date_and_time_functions.html
I know there is already have functions for PHP, however it cannot
handle year expect it was between 1902 and 2037.
http://www.php.net/manual/en/ref.datetime.php
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
(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
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
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 there a way to do calculations with dates? Preferably ignoring weekends.
Thanks, Gary
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL
Gary,
Yes. Check the manual for mktime(); and getdate();
http://www.php.net/quickref.php
James
Is there a way to do calculations with dates? Preferably ignoring
weekends.
Thanks, Gary
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
Jon,
Try this ... I know the code could be trimmed down, but I wrote it this way
for ease of reading.
select name=Date
?
$startday = 01;
$startmonth = 01;
$staryear = 01;
$endday = 01;
$endmonth = 07;
$endyear = 01;
$startperiod = mktime(0,0,0,$startmonth,$startday,$startyear);
$endperiod =
I need to make a select list for a web page in the following format:
01/01/01-01/07/01
01/08/01-01/14/01
01/15/01-01/21/01
etc
etc
till the end of 2002 and further in the future eventually
I'd like to make PHP generate this for me so I don't have to handcode it for
each year in the future.
Jon,
Just had to do almost exactly this - here's one solution. The tricky bit was
getting the number of days in the month - you have to look at next month!
This generates a list for 12 months starting with the current month and outputs
display stuff as well. In our scenario this is passed to a
ahem
$daysinmonth = date('t');
- Original Message -
From: Chris Fry [EMAIL PROTECTED]
To: Jon Rosenberg [EMAIL PROTECTED]
Cc: PHP List [EMAIL PROTECTED]
Sent: Wednesday, May 02, 2001 3:06 AM
Subject: Re: [PHP] date list
Jon,
Just had to do almost exactly this - here's one solution
02, 2001 3:06 AM
Subject: Re: [PHP] date list
Jon,
Just had to do almost exactly this - here's one solution. The tricky bit
was
getting the number of days in the month - you have to look at next month!
This generates a list for 12 months starting with the current month and
outputs
Hi all
I have variable that store date like this :
$First = $year . $month . $date; ( which return 20010201 for Feb 1,2001) .
I wanna do the loop 8 times that will add 7 more days to the begining date and keep
adding it for 8 times. The looping thing is okay but I am not sure if I simply plus 7
On Tue, 24 Apr 2001 23:44, Jacky wrote:
Hi all
I have variable that store date like this :
$First = $year . $month . $date; ( which return 20010201 for Feb
1,2001) . I wanna do the loop 8 times that will add 7 more days to the
begining date and keep adding it for 8 times. The looping thing
Hi all
I have variable that store date like this :
$First = $year . $month . $date; ( which return 20010201 for Feb 1,2001) .
I wanna do the loop 8 times that will add 7 more days to the begining date and keep
adding it for 8 times. The looping thing is okay but I am not sure if I simply plus 7
PHPBeginner.com (Where PHP Begins)
[EMAIL PROTECTED]
www.phpbeginner.com
-Original Message-
From: Jacky [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 11:27 PM
To: [EMAIL PROTECTED]
Subject: [PHP] date add more 7 days, help needed.
Hi all
I have variable that store date like
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
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
//
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
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
Hi I am trying to format a date extracted from my DB. I have run my query
and then have used the following to get my row data
while ($row = mysql_fetch_array($sql_result)) {
$title = $row["message_title"];
$message = $row["message"];
Something I almost always do when pulling dates from a mySQL table is
format the date column in the query itself using the mySQL function
DATE_FORMAT()...
At 01:13 PM 4/6/01 +0100, Matt Davis wrote:
Hi I am trying to format a date extracted from my DB. I have run my query
and then have used
You need a UNIX timestamp for the second argument in date() - thus you need
to first convert your $even into a timestamp (number of seconds past 1970).
?
$event = '2001-03-15 24:03:34';
list($date,$time) = explode(' ',$event);
list($year,$month,$day) = explode('-',$date);
Dear Friends,
I am accessing a MySQL database through PHP.
I have to calculate the difference between todays date and the date obtained
from MySQL database.
The Database string is in the form of \"-mm-dd\".
I have to convert the above string into unix timestamp so that i can calcualte
Lots of ways to do it, here's one.
Convert them both to unix timestamps and subtract.
$nowstamp=mktime() ;
$result=mysql_query(SELECT UNIX_TIMESTAMP(mydatefield) AS dbdate FROM
mydatabase);
$row=mysql_fetch_array($result);
$dbdate=$row["dbdate"];
$thedifference=$nowstamp - $dbdate;
On Sat, 31 Mar 2001 20:07:10 +0600, ([EMAIL PROTECTED]) wrote:
Dear Friends,
I am accessing a MySQL database through PHP.
I have to calculate the difference between todays date and the date
obtained
from MySQL database.
select to_days(curdate())-to_days(datefield) from table;
- Mark
--
PHP
, March 22, 2001 5:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Date subtraction
Hi!
I want to subtract to date times from each other. Like :
'2000 12 01 12:12:12' - '2000 11 10 11:39:59'
Is there any function to do this subtraction or can i do it with MySQL's
SELECT query ?
Thanks
--
PHP
eturns?
beware of the 2037 limitation using UNIX_TIMESTAMP()
regards
Jeff
-Original Message-
From: BlackLord [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 5:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Date subtraction
Hi!
I want to subtract to date times from each
901 - 1000 of 1042 matches
Mail list logo