Re: [PHP-DB] Date problem

2007-01-21 Thread Miles Thompson
At 12:26 PM 1/21/2007, Denis L. Menezes wrote: Dear friends. I have a date field in mysql called event_end . I want to run a query to find all records where the event_and is greater than today's date. I have written the following code. It does not work. Please point out the mistake. $today =

[PHP-DB] Date problem

2007-01-21 Thread Denis L. Menezes
Dear friends. I have a date field in mysql called event_end . I want to run a query to find all records where the event_and is greater than today's date. I have written the following code. It does not work. Please point out the mistake. $today = getdate(); $sql="select * from events where eve

Re: [PHP-DB] Date problem again ;-)

2005-03-22 Thread Forest Liu
I suppose there is a " submit_time" field in your DB table, so you could: "SELECT * FROM `tablename` WHERE `submit_time`>=".lastdays(3) lastdays() is a function you could create using mktime(),time(), and date() On Tue, 22 Mar 2005 16:28:39 -0500, Chris Payne <[EMAIL PROTECTED]> wrote: > Hi ther

[PHP-DB] Date problem again ;-)

2005-03-22 Thread Chris Payne
Hi there everyone, OK I'm using the following in my query to display entries in the LAST 3 days: DATE_SUB(CURDATE(),INTERVAL 3 DAY) <= ListingDate But it doesn't seem to affect the results, the date format in my DB column (ListingDate - datatype is Date) is 2000-00-00 as in year, month

RE: [PHP-DB] Date problem: data is current as of yesterday

2004-07-03 Thread Ford, Mike [LSS]
-Original Message- From: Karen Resplendo To: [EMAIL PROTECTED] Sent: 02/07/04 19:36 Subject: [PHP-DB] Date problem: data is current as of yesterday The database queries all the sources at night after everyone has gone home. That means the data was current as of yesterday. This little

Re: [PHP-DB] Date problem: data is current as of yesterday

2004-07-02 Thread jeffrey_n_Dyke
accidentally replied only to karen. > The database queries all the sources at night after everyone has gone home. That means the data was current as of yesterday. This little snippet below returns yesterday's date, except that the first day of the month returns "0" for > the day. Now, I know why

RE: [PHP-DB] Date problem: data is current as of yesterday

2004-07-02 Thread Neal Carmine
Use strtotime() instead.. http://us2.php.net/manual/en/function.strtotime.php Regards, Neal Carmine Nine Systems Corporation -Original Message- From: Karen Resplendo [mailto:[EMAIL PROTECTED] Sent: Friday, July 02, 2004 12:36 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Date problem

[PHP-DB] Date problem: data is current as of yesterday

2004-07-02 Thread Karen Resplendo
The database queries all the sources at night after everyone has gone home. That means the data was current as of yesterday. This little snippet below returns yesterday's date, except that the first day of the month returns "0" for the day. Now, I know why this is happening, but I can't find out

Re: [PHP-DB] date problem in MySQL DB

2004-01-13 Thread Justin Patrin
Brett King wrote: Hi Angelo Yes you will have to reformat and he is something that may help you. Hope it does function dateCheckMysql ($date) { list($dateDay, $dateMonth, $dateYear) = explode("/", $date); if ((is_numeric($dateDay)) && (is_numeric($dateMonth)) &&

RE: [PHP-DB] date problem in MySQL DB

2004-01-13 Thread brett king
Hi Angelo Yes you will have to reformat and he is something that may help you. Hope it does function dateCheckMysql ($date) { list($dateDay, $dateMonth, $dateYear) = explode("/", $date); if ((is_numeric($dateDay)) && (is_numeric($dateMonth)) && (is_numer

Re: [PHP-DB] date problem in MySQL DB

2004-01-13 Thread CPT John W. Holmes
From: "Angelo Zanetti" <[EMAIL PROTECTED]> > This might be slightly off topic but hopefully someone can help. > I have a field that is a varchar and I stored dates in it. But now I want to > change the type of the column to date, but I have a problem that the formats > differ: > > my format: mm/dd

[PHP-DB] date problem in MySQL DB

2004-01-13 Thread Angelo Zanetti
Hi guys This might be slightly off topic but hopefully someone can help. I have a field that is a varchar and I stored dates in it. But now I want to change the type of the column to date, but I have a problem that the formats differ: my format: mm/dd/ mySQL format: -mm-dd So can I eithe

RE: [PHP-DB] Date problem

2003-07-14 Thread Gary . Every
IX Administrator Ingram Entertainment (615) 287-4876 "Pay It Forward" mailto:[EMAIL PROTECTED] http://accessingram.com > -Original Message- > From: Chris Payne [mailto:[EMAIL PROTECTED] > Sent: Monday, July 14, 2003 3:45 AM > To: php > Subject: [PHP-DB] Date problem

[PHP-DB] Date problem

2003-07-14 Thread Chris Payne
Hi there everyone, I use the below code to grab the current date, convert it to a unix timestamp to do some bits then it's supposed to change the date back with the new values (IE: current date - x amount of seconds) but it's not doing it correctly, it's probably DEAD obvious to everyone as my

Re: [PHP-DB] date problem

2002-07-05 Thread ditoiu cristian
maybe you should try if($date!=="-00-00") {do something} "Dl Neil" <[EMAIL PROTECTED]> wrote in message 0df801c1cb3d$c947e420$c200a8c0@jrbrown">news:0df801c1cb3d$c947e420$c200a8c0@jrbrown... > Rehab, > > > i have an input field in a form that accept date called $date and in > databse i made i

[PHP-DB] 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

[PHP-DB] 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-DB] Date problem

2002-05-12 Thread Pierre-Alain Joye
> i get $postdate from my mysql database,the problem is that i want > to increase that date by 6 months?? > its stored in mysql as date field http://www.mysql.com/doc/D/a/Date_and_time_functions.html check DATE_ADD :) hth pa -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

[PHP-DB] Date problem

2002-05-12 Thread its me
i get $postdate from my mysql database,the problem is that i want to increase that date by 6 months?? its stored in mysql as date field

RE: [PHP-DB] date problem

2002-03-14 Thread Rick Emery
if( strcmp($date,"-00-00") ) { do something} -Original Message- From: its me [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 14, 2002 12:16 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] date problem i have an input field in a form that accept date called $date and in data

Re: [PHP-DB] date problem

2002-03-14 Thread DL Neil
Rehab, > i have an input field in a form that accept date called $date and in databse i made it of type $date so its defualt is -00-00 > > the problem is when i say: > if($date!="-00-00") > {do something} > > he doesn't understand $date!="-00-00" Please copy-paste the actual error m

[PHP-DB] date problem

2002-03-13 Thread its me
i have an input field in a form that accept date called $date and in databse i made it of type $date so its defualt is -00-00 the problem is when i say: if($date!="-00-00") {do something} he doesn't understand $date!="-00-00" Rehab M.Shouman -

Re: [PHP-DB] Date problem with new year

2002-01-02 Thread Fred
t; > -- > Faye Keesic > Computer Programmer Analyst/Web Page Design > > > > From: Rick Emery <[EMAIL PROTECTED]> > > Date: Wed, 2 Jan 2002 09:05:42 -0600 > > To: [EMAIL PROTECTED] > > Subject: RE: [PHP-DB] Date problem with new year > > > >

Re: [PHP-DB] Date problem with new year

2002-01-02 Thread Daniel Barton
> > > > > From: [EMAIL PROTECTED] > > > Date: Wed, 2 Jan 2002 07:55:02 -0800 (PST) > > > To: Faye Keesic <[EMAIL PROTECTED]> > > > Cc: [EMAIL PROTECTED] > > > Subject: Re: [PHP-DB] Date problem with new year > > > > > > Ah... the

Re: [PHP-DB] Date problem with new year

2002-01-02 Thread ted
=JDToGregorian($greg_date); > -- > Faye Keesic > Computer Programmer Analyst/Web Page Design > > > > From: [EMAIL PROTECTED] > > Date: Wed, 2 Jan 2002 07:55:02 -0800 (PST) > > To: Faye Keesic <[EMAIL PROTECTED]> > > Cc: [EMAIL PROTECTED] > > Subject: Re: [

Re: [PHP-DB] Date problem with new year

2002-01-02 Thread Faye Keesic
Faye Keesic <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] Date problem with new year > > Ah... the "$datetoget = ($datetoget-1)" is the problem. > > Convert the Gregorian Ymd date to Julian, subtract 1, then convert the > Julian date back

Re: [PHP-DB] Date problem with new year

2002-01-02 Thread ted
t; } > > -- > Faye Keesic > Computer Programmer Analyst/Web Page Design > > > > From: Rick Emery <[EMAIL PROTECTED]> > > Date: Wed, 2 Jan 2002 09:05:42 -0600 > > To: [EMAIL PROTECTED] > > Subject: RE: [PHP-DB] Date problem with new year > > >

Re: [PHP-DB] Date problem with new year

2002-01-02 Thread ted
Did you convert the dates to PHP's "Julian" format before subtracting? On Wed, 2 Jan 2002, Faye Keesic wrote: > I have a db site that always displays the most recent occurrence of news > stories > > The last occurrence of stories was last year (2001-12-31) and up to the new > year rolling ov

Re: [PHP-DB] Date problem with new year

2002-01-02 Thread Faye Keesic
ntil there are stories found $datetoget=($datetoget-1); get_most_recent_stories($datetoget); } -- Faye Keesic Computer Programmer Analyst/Web Page Design > From: Rick Emery <[EMAIL PROTECTED]> > Date: Wed, 2 Jan 2002 09:05:42 -0600 > To: [EMAIL PROTECTED] > Subject: RE: [PHP-DB] Da

RE: [PHP-DB] Date problem with new year

2002-01-02 Thread Rick Emery
No bug, mate. Post your code so that we can help ya... -Original Message- From: Faye Keesic [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 8:56 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Date problem with new year I have a db site that always displays the most recent

[PHP-DB] Date problem with new year

2002-01-02 Thread Faye Keesic
I have a db site that always displays the most recent occurrence of news stories The last occurrence of stories was last year (2001-12-31) and up to the new year rolling over, I had no difficulty subtracting days, etc. Is there a bug in Mysql? PHP that I don't know of.. Please help. --