[PHP] date problem

2013-01-03 Thread Marc Fromm
I am comparing to dates. define('WSOFFBEGIN','09/16/2012'); $jes = 01/03/2012; if ( date(m/d/Y, strtotime($jes)) date(m/d/Y, strtotime(WSOFFBEGIN)) ) { $error = MUST begin after . WSOFFBEGIN . \n; } I cannot figure out why the $error is being assigned inside the if statement,

Re: [PHP] date problem

2013-01-03 Thread Jonathan Sundquist
1/3/2012 is in fact less then 9/16/2012. On Thu, Jan 3, 2013 at 3:57 PM, Marc Fromm marc.fr...@wwu.edu wrote: I am comparing to dates. define('WSOFFBEGIN','09/16/2012'); $jes = 01/03/2012; if ( date(m/d/Y, strtotime($jes)) date(m/d/Y, strtotime(WSOFFBEGIN)) ) { $error

Re: [PHP] date problem

2013-01-03 Thread Serge Fonville
Hi. date returns a string You should compare a different type for bigger/smaller than HTH Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server

Re: [PHP] date problem

2013-01-03 Thread Ken Robinson
At 04:57 PM 1/3/2013, Marc Fromm wrote: I am comparing to dates. define('WSOFFBEGIN','09/16/2012'); $jes = 01/03/2012; if ( date(m/d/Y, strtotime($jes)) date(m/d/Y, strtotime(WSOFFBEGIN)) ) { $error = MUST begin after . WSOFFBEGIN . \n; } I cannot figure out why the $error

RE: [PHP] date problem

2013-01-03 Thread Marc Fromm
:05 PM To: Marc Fromm Cc: php-general@lists.php.net Subject: Re: [PHP] date problem Hi. date returns a string You should compare a different type for bigger/smaller than HTH Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add

Re: [PHP] date problem

2013-01-03 Thread Jonathan Sundquist
)){ // bla bla } Thanks From: Serge Fonville [mailto:serge.fonvi...@gmail.com] Sent: Thursday, January 03, 2013 2:05 PM To: Marc Fromm Cc: php-general@lists.php.net Subject: Re: [PHP] date problem Hi. date returns a string You should compare a different type for bigger/smaller

RE: [PHP] date problem

2013-01-03 Thread Marc Fromm
Thanks Jonathan. I removed the date() syntax function and it works. From: Jonathan Sundquist [mailto:jsundqu...@gmail.com] Sent: Thursday, January 03, 2013 2:16 PM To: Marc Fromm Cc: Serge Fonville; php-general@lists.php.net Subject: Re: [PHP] date problem Marc, When you take a date and do

Re: [PHP] date problem

2013-01-03 Thread Jim Giner
On 1/3/2013 5:22 PM, Marc Fromm wrote: Thanks Jonathan. I removed the date() syntax function and it works. From: Jonathan Sundquist [mailto:jsundqu...@gmail.com] Sent: Thursday, January 03, 2013 2:16 PM To: Marc Fromm Cc: Serge Fonville; php-general@lists.php.net Subject: Re: [PHP] date problem

Re: [PHP] date problem

2013-01-03 Thread Jim Lucas
On 01/03/2013 01:57 PM, Marc Fromm wrote: $jes = 01/03/2012; # php -r echo 01/03/2012; 0.00016567263088138 You might want to put quotes around that value so it is actually a string and does not get evaluated. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP

Re: [PHP] date problem

2011-04-02 Thread Louis Huppenbauer
Just try of March. Worked for me. print first: .date(d-m-Y H:i:s,strtotime('first Tuesday of March 2011')).\n; print second: .date(d-m-Y H:i:s,strtotime('second Tuesday of March 2011')).\n; print third: .date(d-m-Y H:i:s,strtotime('third Tuesday of March 2011')).\n; print fourth: .date(d-m-Y

Re: [PHP] date problem

2011-04-02 Thread Dan Dan
It seems different php versions have different outputs for this code: Fedora Core 14 (x86): first: 01-03-2011 00:00:00 second: 08-03-2011 00:00:00 third: 22-03-2011 00:00:00 fourth: 22-03-2011 00:00:00 fifth: 29-03-2011 00:00:00 Fedora Core11 (x86_64): first: 31-12-1969 16:00:00 second:

Re: [PHP] date problem

2011-04-01 Thread Dan Dan
I removed the day (1 before the March), but its still giving the same result, i.e. different days of month with and without the 'first'. Any further help ? print first Tuesday :.date(d-m-Y H:i:s,strtotime('March 2011 Tuesday')).\n; print first: .date(d-m-Y H:i:s,strtotime('March 2011 first

[PHP] Date Problem with \n

2007-08-13 Thread Kevin Murphy
Small issue with formatting a date. If I type in this: echo date(g:i:s a \o\n l F j, Y); the n character in the word on doesn't appear, but instead what I get is a new line in the source code. If I type it as: echo date(g:i:s a \on l F j, Y); I get the number 8 (current month) where the n

Re: [PHP] Date Problem with \n

2007-08-13 Thread Jim Lucas
Kevin Murphy wrote: Small issue with formatting a date. If I type in this: echo date(g:i:s a \o\n l F j, Y); the n character in the word on doesn't appear, but instead what I get is a new line in the source code. If I type it as: echo date(g:i:s a \on l F j, Y); I get the number 8 (current

Re: [PHP] Date Problem with \n

2007-08-13 Thread Richard Lynch
On Mon, August 13, 2007 12:50 pm, Kevin Murphy wrote: Small issue with formatting a date. If I type in this: echo date(g:i:s a \o\n l F j, Y); the n character in the word on doesn't appear, but instead what I get is a new line in the source code. If I type it as: echo date(g:i:s a \on l F

Re: [PHP] date() problem

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

Re: [PHP] date() problem

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

[PHP] date() problem

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

Re: [PHP] date() problem

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

Re: [PHP] date() problem

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

Re: [PHP] date() problem

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

Re: [PHP] date() problem

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

Re: [PHP] date() problem

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

Re: [PHP] date() problem

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

Re: [PHP] date() problem

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

Re: [PHP] date() problem

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

Re: [PHP] date() problem

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

[PHP] date problem

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

[PHP] Date problem?

2004-12-22 Thread PHP
echo date('F',strtotime("next month")); This is printing February right now. Does this sound right or is this a but in strtotime()? is "next month" a valid parameter? and yes, I am sure our server is set to December(todays date). echo date('F',strtotime("last month")); Does give me

Re: [PHP] Date problem?

2004-12-22 Thread Christopher Fulton
Try this instead... echo date('F',strtotime(+1 month)); read through the user comments at... http://us2.php.net/manual/en/function.strtotime.php there are some things pertaining to your situtation -Chris On Wed, 22 Dec 2004 15:38:38 -0800, PHP [EMAIL PROTECTED] wrote: echo

Re: [PHP] Date problem?

2004-12-22 Thread PHP
Hi, I did use the +1 month, but I was just curious as to what was up. Try this instead... echo date('F',strtotime(+1 month)); read through the user comments at... http://us2.php.net/manual/en/function.strtotime.php there are some things pertaining to your situtation -Chris On Wed, 22 Dec 2004

Re: [PHP] Date problem?

2004-12-22 Thread PHP
Ok, I was using the download version of the manual and it didn't have any user comments on this, but the online one does. Hi, I did use the +1 month, but I was just curious as to what was up. Try this instead... echo date('F',strtotime(+1 month)); read through the user comments at...

Re: [PHP] Date problem?

2004-12-22 Thread Sebastian
try +one month - Original Message - From: PHP To: php Sent: Wednesday, December 22, 2004 6:38 PM Subject: [PHP] Date problem? echo date('F',strtotime(next month)); This is printing February right now. Does this sound right or is this a but in strtotime()? is next month

[PHP] date problem

2003-09-24 Thread Shaun
Hi, Why does the following code print '00', surely it should print '08', I'm baffled! date(H, mktime(8, 0, 0, 0, 0, 0)); Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date problem

2003-09-24 Thread Curt Zirzow
* Thus wrote Shaun ([EMAIL PROTECTED]): Hi, Why does the following code print '00', surely it should print '08', I'm baffled! date(H, mktime(8, 0, 0, 0, 0, 0)); ?php echo date(r, mktime(8,0,0,0,0,0)), \n; //Wed, 31 Dec 1969 23:59:59 + echo date(r, mktime(0,0,0,0,0,0)), \n; //Wed, 31

[PHP] Date problem

2003-06-23 Thread Logan McKinley
I am storing dates in an Access database in a field with a Date/Time Type the date is being generated using date(n/d/Y h:i a). It appears to be stored in Access correctly but when I output it to the page using PHP it seems to be changing. It is being stored in the database as 6/19/2003 1:44:00

Re: [PHP] Date problem

2003-06-23 Thread Mike Migurski
I am storing dates in an Access database in a field with a Date/Time Type the date is being generated using date(n/d/Y h:i a). It appears to be stored in Access correctly but when I output it to the page using PHP it seems to be changing. It is being stored in the database as 6/19/2003 1:44:00

RE: [PHP] Date problem

2003-06-23 Thread Dan Joseph
Message- From: Logan McKinley [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2003 5:06 PM To: [EMAIL PROTECTED] Subject: [PHP] Date problem I am storing dates in an Access database in a field with a Date/Time Type the date is being generated using date(n/d/Y h:i a). It appears to be stored

[PHP] Date Problem - Last Day Of Month

2003-03-31 Thread Vinesh Hansjee
Hi there, can anyone tell me how to fix my code so that on the last day of the month, my code doesn't repeat the months... What the code suppose to do is, makes a drop down box from which you can select the month, and if its the current month the box is already selected. select name=month ? for

Re: [PHP] Date Problem - Last Day Of Month

2003-03-31 Thread Liam Gibbs
Hi there, can anyone tell me how to fix my code so that on the last day of the month, my code doesn't repeat the months... I'm not sure what you mean by this, but I can be a moron on this list sometimes and the clear answer usually comes to me about 2 seconds after I hit the send button. Do you

Re: [PHP] Date Problem - Last Day Of Month

2003-03-31 Thread Daniel Guerrier
change for ($i=1; $i=12; $i++) to for ($i=1; $i12; $i++) --- Vinesh Hansjee [EMAIL PROTECTED] wrote: Hi there, can anyone tell me how to fix my code so that on the last day of the month, my code doesn't repeat the months... What the code suppose to do is, makes a drop down box from which

Re: [PHP] Date Problem - Last Day Of Month

2003-03-31 Thread Kevin Stone
- Original Message - From: Vinesh Hansjee [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 31, 2003 6:55 AM Subject: [PHP] Date Problem - Last Day Of Month Hi there, can anyone tell me how to fix my code so that on the last day of the month, my code doesn't repeat

[PHP] date problem

2003-03-19 Thread shaun
hi, using date(dS); how can i can increase the days so that it shows 19th 20th 21st I have tried while ($i 2){ $day++; echo' td'.$day.'/td'; $i++; } but i get: 19th 19ti 19tj thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] date problem

2003-02-27 Thread Alexander Tsonev
Hello, I would ask you a question about date type if I have a variable from date type ($newdate) such as 2003-02-17 how can I separate $newdate into 3 different variables? I want to create such variables: $day=17 $month=2 $year=2003 I searched a lot, but I didn't find how to do this. I'll be very

Re: [PHP] date problem

2003-02-27 Thread Lowell Allen
From: Alexander Tsonev [EMAIL PROTECTED] Hello, I would ask you a question about date type if I have a variable from date type ($newdate) such as 2003-02-17 how can I separate $newdate into 3 different variables? I want to create such variables: $day=17 $month=2 $year=2003 I searched a

[PHP] Date problem

2002-12-31 Thread Denis L. Menezes
Hello friends. Happy New Year to you all. Our school holds many seminars of varying durations and dates. I want to make a page which says What's on today which will show all the seminars that are on today. However the entry in the database will show two fields Commencing Date and Ending date.

Re: [PHP] Date problem

2002-12-31 Thread Rick Widmer
At 05:23 PM 12/31/02 +0800, Denis L. Menezes wrote: Hello friends. Is there a routine in PHP I can use to find if today's date fits between the commencing date and the ending date? SELECT * FROM Table WHERE NOW() = StartDate AND NOW() = EndDate Rick -- PHP General Mailing List

RE: [PHP] Date problem

2002-12-31 Thread John W. Holmes
Our school holds many seminars of varying durations and dates. I want to make a page which says What's on today which will show all the seminars that are on today. However the entry in the database will show two fields Commencing Date and Ending date. Is there a routine in PHP I can use to

RE: [PHP] Date problem

2002-12-03 Thread James Coates
At 18:44 02/12/2002 -0500, John W. Holmes wrote: Can you help me for this ? Yeah, I already did: Perhaps you could throw a clue my way, in that case. I have an actor database (mySQL again) which has actor dates of birth in '-MM-DD' format. I want to be able to query against that

Re: [PHP] Date problem

2002-12-03 Thread Jason Wong
On Tuesday 03 December 2002 18:29, James Coates wrote: Perhaps you could throw a clue my way, in that case. I have an actor database (mySQL again) which has actor dates of birth in '-MM-DD' format. I want to be able to query against that ignoring the year: * give me actors who have

Re: [PHP] Date problem

2002-12-03 Thread James Coates
At 19:32 03/12/2002 +0800, Jason Wong wrote: Assuming the column holding the the birthday is called 'birthday': [snip] Many thanks! * give me actors whose birthdays fall between two dates (ie: Aries) This one is easy, use the BETWEEN clause in your SELECT statement. Consult manual for

Re: [PHP] Date problem

2002-12-02 Thread Rosen
Thanks for this, I understand how to update in date in database, but I need when I get date from database to increase or decrease before to save in database. Can you help me for this ? John W. Holmes [EMAIL PROTECTED] wrote in message

RE: [PHP] Date problem

2002-12-02 Thread John W. Holmes
Thanks for this, I understand how to update in date in database, but I need when I get date from database to increase or decrease before to save in database. Can you help me for this ? Yeah, I already did: You can select out the date you have now, use strtotime() to make it into a unix

[PHP] Date problem

2002-12-01 Thread Rosen
Hi, I have one problem: Date field in MySql database with value as 2002-31-12. I want to increment or decrement this date and to put it again in table. Can someone help me to increment or decrement date with some days? Thanks, Rosen -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Date problem

2002-12-01 Thread John W. Holmes
I have one problem: Date field in MySql database with value as 2002-31-12. I want to increment or decrement this date and to put it again in table. Can someone help me to increment or decrement date with some days? UPDATE yourtable SET yourcolumn = yourcolumn + INTERVAL 1 DAY WHERE ...

Re: [PHP] Date problem

2002-12-01 Thread Rosen
Thanks, But I need before to save date in database to do some checks with the inc/dec date. Cal you help me ? Thanks, Rosen John W. Holmes [EMAIL PROTECTED] wrote in message 002301c29960$21d6a360$7c02a8c0@coconut">news:002301c29960$21d6a360$7c02a8c0@coconut... I have one problem: Date field

RE: [PHP] Date problem

2002-12-01 Thread John W. Holmes
What exactly do you want to do? I'm not a mind reader... ---John Holmes... -Original Message- From: Rosen [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 01, 2002 12:54 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Date problem Thanks, But I need before to save date in database

Re: [PHP] Date problem

2002-12-01 Thread Rosen
01c29965$7862e950$7c02a8c0@coconut... What exactly do you want to do? I'm not a mind reader... ---John Holmes... -Original Message- From: Rosen [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 01, 2002 12:54 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Date problem Thanks,

Re: [PHP] Date problem

2002-12-01 Thread Justin French
on 02/12/02 9:59 AM, Rosen ([EMAIL PROTECTED]) wrote: I want to get date from database, to increment ot decrement it with some days, to show the date and after thath if user confirm it to save it to database. And in what format is the date currently stored? -MM-DD? MySQL timestamp? Unix

Re: [PHP] Date problem

2002-12-01 Thread Rosen
It's in -MM-YY Justin French [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 02/12/02 9:59 AM, Rosen ([EMAIL PROTECTED]) wrote: I want to get date from database, to increment ot decrement it with some days, to show the date and after thath if user

RE: [PHP] Date problem

2002-12-01 Thread John W. Holmes
I want to get date from database, to increment ot decrement it with some days, to show the date and after thath if user confirm it to save it to database. There are a ton of ways you can do it. You can select the date and it's inc/dec value in the same statement: SELECT datecol, datecol +

[PHP] date problem

2002-11-09 Thread Michael P. Carel
to all; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date problem

2002-11-09 Thread Maxim Maletsky
say it again? -- Maxim Maletsky [EMAIL PROTECTED] On Sun, 10 Nov 2002 12:37:48 +0800 Michael P. Carel [EMAIL PROTECTED] wrote: to all; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Date-problem?

2002-09-26 Thread Gustavus
Hi, I'm using ImpAkt2 (PHP4, MySql, Apache on W2K) I have update form (which has date-field). So now I have to enter date on format yy.mm.dd (ex. today 02.09.27), and in the database has then correct format -mm-dd. Ok! I have also listing-page, which has date-field (it format is

[PHP] date problem

2002-08-16 Thread Kae Verens
when I place date(h:i a) in a page on my server, and view it in a browser, I am returned: 02:51 pm. According to the server itself, though (logged in through ssh), using date, it is 3:51. gmdate(h:i a) returns the same 2:51 time. They are both one hour off from the server time. Any ideas of

Re: [PHP] date problem

2002-08-16 Thread Jason Wong
On Friday 16 August 2002 17:24, Kae Verens wrote: when I place date(h:i a) in a page on my server, and view it in a browser, I am returned: 02:51 pm. According to the server itself, though (logged in through ssh), using date, it is 3:51. gmdate(h:i a) returns the same 2:51 time. They are both

[PHP] Date() Problem

2002-07-27 Thread Tony Harrison
Hi, im making a tab/lyric portal, and for viewing tabs i want to display the time the lyric/tab was submitted. So I retrive it from a MySQL database (as a timestamp) and format it using the date function. The problem is, that the date: 19-01-2038 04:14:07 is allways returned, even though in the

RE: [PHP] date problem

2002-06-06 Thread John Holmes
don't have any more queries based on time or date... ---John Holmes... -Original Message- From: andy [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 2:02 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] date problem Hi there, I would like to count the users out

RE: [PHP] date problem

2002-06-06 Thread Dan Hardiker
SELECT COUNT(*) AS c FROM users_table WHERE UNIX_TIMESTAMP( user_regdate ) '1022882400' The only way you can do it with a char column is to select the entire database, load it into a PHP array, using strtotime() to (hopefully) convert May 29, 2002, etc, into a unix timestamp, and then

RE: [PHP] date problem

2002-06-06 Thread John Holmes
SELECT COUNT(*) AS c FROM users_table WHERE UNIX_TIMESTAMP( user_regdate ) '1022882400' The only way you can do it with a char column is to select the entire database, load it into a PHP array, using strtotime() to (hopefully) convert May 29, 2002, etc, into a unix timestamp, and

[PHP] date problem

2002-06-05 Thread andy
Hi there, I would like to count the users out of a mysql db who registered after a certain date. The column I have in the db is a char and I do not want to change this anymore. This is how a typical entry looks like: May 29, 2002 This is how I tryed it: // while '10...' is unix timestamp june

Re: [PHP] date problem

2002-06-05 Thread Miguel Cruz
On Thu, 6 Jun 2002, andy wrote: I would like to count the users out of a mysql db who registered after a certain date. The column I have in the db is a char and I do not want to change this anymore. This is how a typical entry looks like: May 29, 2002 This is how I tryed it: // while

[PHP] date problem

2002-04-28 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all I have a field in MySQL db like this: date TIMESTAMP, and it looks pretty regular like this: 20020428011911 when I come to use php date(D M Y, $myTimeStamp) though I get TUE JAN 2038! I see something in the manual re this date but I'm

Re: [PHP] date problem

2002-04-28 Thread Richard Emery
: SELECT DATE_FORMAT(mydate,%e %b %Y) AS thedate FROM mytable - Original Message - From: Nick Wilson [EMAIL PROTECTED] To: php-general [EMAIL PROTECTED] Sent: Sunday, April 28, 2002 7:48 AM Subject: [PHP] date problem -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all I have a field

Re: [PHP] date problem

2002-04-28 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Richard Emery declared Third, let Mysql do the conversion for you. For instance if you timestamp field is named mydate: SELECT DATE_FORMAT(mydate,%e %b %Y) AS thedate FROM mytable Nice one, cheers Richard. I didn't know about

Re: [PHP] date problem

2002-04-28 Thread Jason Wong
On Sunday 28 April 2002 21:10, Nick Wilson wrote: * and then Richard Emery declared Third, let Mysql do the conversion for you. For instance if you timestamp field is named mydate: SELECT DATE_FORMAT(mydate,%e %b %Y) AS thedate FROM mytable Nice one, cheers Richard. I didn't

Re: [PHP] date problem

2002-04-28 Thread David Freeman
On 28 Apr 2002 at 14:48, Nick Wilson wrote: I have a field in MySQL db like this: date TIMESTAMP, and it looks pretty regular like this: 20020428011911 If you've got the data in your database then do the date/time conversions as part of your sql query - it's more efficient. Something like

[PHP] date problem

2002-02-18 Thread eoghan
hello i am running into some trouble with a very basic problem. i want to insert the current date/time into my db. i have the field set up as a datetime field. when i submit info, i just get a blank date, i mean it all zeros, like -00-00 00.00:00:00. how do i insert the current datetime

RE: [PHP] date problem

2002-02-18 Thread Niklas Lampén
date() is your answer, use it in the piece of code generating the query. $DateTime = date(Y-m-d H:i:s); // 2002-02-18 16:10:43 Niklas -Original Message- From: eoghan [mailto:[EMAIL PROTECTED]] Sent: 18. helmikuuta 2002 16:14 To: [EMAIL PROTECTED] Subject: [PHP] date problem hello

[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 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 problem: some months have 5 weeks... how I discover which ones?

2001-01-18 Thread Romulo Roberto Pereira
Hey! A little bit of definition: - a week start on sunday and ends on saturday; - a year has 365/7 ~= 52 weeks; How do I discover what months have 5 weeks and what have 4? Rom

Re: [PHP] date problem: some months have 5 weeks... how I discover which ones?

2001-01-18 Thread Josh G
. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering. - Original Message - From: "Romulo Roberto Pereira" [EMAIL PROTECTED] To: "php-general" [EMAIL PROTECTED] Sent: Friday, January 19, 2001 11:07 AM Subject: [PHP] date problem: some

Re: [PHP] date problem: some months have 5 weeks... how I discoverwhich ones?

2001-01-18 Thread jeremy brand
ckdown.com/ On Thu, 18 Jan 2001, Romulo Roberto Pereira wrote: Date: Thu, 18 Jan 2001 19:07:31 -0500 From: Romulo Roberto Pereira [EMAIL PROTECTED] To: php-general [EMAIL PROTECTED] Subject: [PHP] date problem: some months have 5 weeks... how I discover which ones? Hey! A little bit of

Re: [PHP] date problem: some months have 5 weeks... how I discoverwhichones?

2001-01-18 Thread jeremy brand
For a newspaper, a week start on sunday and ends in a saturday. Media planners divide ads in newspapers by monhs and than by weeks, respectively. Well, this _seems_ contradictory to your original "definition", but I got it. so let's say: january 2001 started in a monday Su Mo Tu We