[PHP] Date aritmetic

2002-01-02 Thread Carlos Fernando Scheidecker Antunes
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

Re: [PHP] Date aritmetic

2002-01-02 Thread Bogdan Stancescu
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

Re: [PHP] Date aritmetic

2002-01-02 Thread Bogdan Stancescu
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

RE: [PHP] Date aritmetic

2002-01-02 Thread Martin Towell
-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

RE: [PHP] Date aritmetic

2002-01-02 Thread Martin Towell
: 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

[PHP] Date Formatting/Reading

2001-12-13 Thread PHPGalaxy.com
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

[PHP] Date

2001-12-12 Thread Max
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

Re: [PHP] Date

2001-12-12 Thread Mehmet Kamil ERISEN
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'];

Re: [PHP] Date

2001-12-12 Thread JSheble
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 =

[PHP] Date

2001-12-11 Thread Brian V Bonini
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

RE: [PHP] Date

2001-12-11 Thread Jon Haworth
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

[PHP] Date formatting

2001-12-11 Thread phantom
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

Re: [PHP] Date formatting

2001-12-11 Thread Kevin Stone
, 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

Re: [PHP] Date formatting

2001-12-11 Thread Steve Cayford
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

Re: [PHP] Date formatting

2001-12-11 Thread Miles Thompson
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 ;

[PHP] Date

2001-12-11 Thread Brian V Bonini
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

Re: [PHP] Date

2001-12-11 Thread Kevin Stone
- 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

[PHP] DATE Questions

2001-11-20 Thread Oosten, Sjoerd van
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

[PHP] Date Problem

2001-11-20 Thread MindHunter
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?

[PHP] date conversion and calculation problem...

2001-11-12 Thread py
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

RE: [PHP] date conversion and calculation problem...

2001-11-12 Thread Jason Murray
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 =

RE: [PHP] date conversion and calculation problem...

2001-11-12 Thread Martin Towell
] ); 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

Re: [PHP] Date help (no not that kind)

2001-11-11 Thread DL Neil
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 =

[PHP] Date help (no not that kind)

2001-11-10 Thread sundogcurt
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 =

[PHP] Date problems

2001-11-02 Thread Raymond C. Rodgers
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

[PHP] date problem

2001-10-30 Thread Steve Tsai
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

[PHP] DATE FORMAT ISSUES

2001-10-22 Thread Beeman
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

[PHP] Date-TimeStamp

2001-10-20 Thread Daniel Harik
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

[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 formatting in PHP 3.0

2001-08-30 Thread Paul McGee
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

Re: [PHP] Date formatting in PHP 3.0

2001-08-30 Thread * RzE:
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

Re: [PHP] Date formatting in PHP 3.0

2001-08-30 Thread Paul McGee
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

Re: [PHP] Date formatting in PHP 3.0

2001-08-30 Thread * RzE:
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

[PHP] Date Functions

2001-08-20 Thread Peter Allum
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

Re: [PHP] Date Functions

2001-08-20 Thread Renze Munnik
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

[PHP] Date function

2001-08-15 Thread Mike Mike
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

Re: [PHP] Date function

2001-08-15 Thread ReDucTor
?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

Re: [PHP] Date function

2001-08-15 Thread Brian C. Doyle
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

Re: [PHP] Date function

2001-08-15 Thread David Robley
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

Re: [PHP] Date function

2001-08-15 Thread Don Read
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

RE: [PHP] php date bug ?

2001-08-03 Thread Johnny Nguyen
-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

RE: [PHP] php date bug ?

2001-08-03 Thread Johnny Nguyen
:[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

Re: [PHP] php date bug ?

2001-08-03 Thread Richard Lynch
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

Re: [PHP] php date bug ?

2001-08-03 Thread Tom Carter
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

Re: [PHP] php date

2001-07-28 Thread Michael Hall
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

[PHP] php date

2001-07-27 Thread colin
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

[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

2001-07-23 Thread Yamin Prabudy
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]

[PHP] date HELP !!!!!

2001-07-23 Thread Yamin Prabudy
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]

Re: [PHP] date HELP !!!!!

2001-07-23 Thread ReDucTor
$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

Re: [PHP] date HELP !!!!!

2001-07-23 Thread Daniel Rezny
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

Re: [PHP] date HELP !!!!!

2001-07-23 Thread Henrik Hansen
: 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

Re: [PHP] date HELP !!!!!

2001-07-23 Thread James Holloway
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

[PHP] date

2001-07-19 Thread Duy B
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

Re: [PHP] date

2001-07-19 Thread AJDIN BRANDIC
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

[PHP] date change for unix platforms on sept 9th

2001-07-11 Thread scott [gts]
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

RE: [PHP] date change for unix platforms on sept 9th

2001-07-11 Thread Don Read
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

Re: [PHP] date - day

2001-06-26 Thread Philip Olson
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:

Re: [PHP] date - day

2001-06-26 Thread infoz
: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

Re: [PHP] date - day

2001-06-26 Thread David Robley
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,

Re: [PHP] date - day

2001-06-26 Thread Gyozo Papp
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

[PHP] date - day

2001-06-25 Thread Tyler Longren
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

Re: [PHP] Date (Year) .. adding..

2001-05-24 Thread Rob Hardowa
(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

[PHP] Date (Year) .. adding..

2001-05-22 Thread Jason Caldwell
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

RE: [PHP] Date (Year) .. adding..

2001-05-22 Thread Tyler Longren
? $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

[PHP] Date and Time Functions like MySQL?

2001-05-18 Thread Chris Lee
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

[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
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

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 calculation

2001-05-04 Thread Gary
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

Re: [PHP] date calculation

2001-05-04 Thread James Holloway
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

Re: [PHP] date list

2001-05-02 Thread James Holloway
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 =

[PHP] date list

2001-05-01 Thread Jon Rosenberg
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.

Re: [PHP] date list

2001-05-01 Thread Chris Fry
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

Re: [PHP] date list

2001-05-01 Thread Tomasz Abramowicz
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

Re: [PHP] date list

2001-05-01 Thread Chris Fry
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

[PHP] date plus 7 more days

2001-04-23 Thread Jacky
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

Re: [PHP] date plus 7 more days

2001-04-23 Thread David Robley
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

[PHP] date add more 7 days, help needed.

2001-04-23 Thread Jacky
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

RE: [PHP] date add more 7 days, help needed.

2001-04-23 Thread Maxim Maletsky
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

[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 formatting

2001-04-06 Thread Matt Davis
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"];

Re: [PHP] Date formatting

2001-04-06 Thread Joe Sheble (Wizaerd)
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

Re: [PHP] Date formatting

2001-04-06 Thread Joe Stump
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);

[PHP] Date difference

2001-03-31 Thread ravi
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

Re: [PHP] Date difference

2001-03-31 Thread bill
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;

Re: [PHP] Date difference

2001-03-31 Thread Mark Maggelet
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

RE: [PHP] Date subtraction

2001-03-23 Thread Jeff Armstrong
, 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

Re: [PHP] Date subtraction

2001-03-23 Thread BlackLord
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

<    5   6   7   8   9   10   11   >