Hi Michael,
FYI: I'm using 5.6.13 and your query returns 0 for the third column with my
instance.
Cheers,
Sam
On Wed, Oct 23, 2013 at 2:35 AM, Michael Stroh st...@astroh.org wrote:
I recently upgraded a local MySQL installation to 5.5.32 and am trying to
figure out why the following query
Thanks Sam.
It turns out that if I put the DATE_ADD.. within DATE(), it works as expected.
That is sufficient for my goals, but it would be nice to understand this issue
in case there may be other cases that I need to watch out for.
Cheers,
Michael
On Oct 22, 2013, at 6:18 PM, kitlenv
2013/10/22 12:20 -0400,
I recently upgraded a local MySQL installation to 5.5.32 and am trying to
figure out why the following query won't work as expected anymore. I'm just
trying to compare a set of dates to NOW() but since the upgrade, these don't
seem to work as expected.
SELECT
2012/03/16 13:30 -0400, Simon Wilkinson
My query for this is as follows: select * from table where table.date1 -
table.date2 between 28425600 and 29030400;
I would not count on that subtraction s yielding a meaningful number: the types
are not Unix timestamps. I would use TIMESTAMPDIFF, with a
Simon,
It's likely that when you specify the times as integer literals they
are being converted to something you don't expect. You can use EXPLAIN
EXTENDED followed by SHOW WARNINGS to see what's happening; it might
be interesting and educational. I would specify the times you want as
datetime
Kapoor, Nishikant [EMAIL PROTECTED] wrote on
08/01/2005 09:55:21 AM:
I am probably missing something very simple, but appreciate it if
someone could point me to that.
I am doing this query on following table to fetch recs for a month:
SELECT fName, lName, acctOpenDate FROM test WHERE
Miguel - You can compare dates directly using and - no need for
a special function. Dates are older when they are less than other
dates.
Cheers.
Jeff
On Tuesday, July 15, 2003, at 09:36 AM, Miguel Perez wrote:
Hi:
I was wondering if there is a date function to get the older date
between
This would do it if you are just comparing two dates:
$max_date = ($date1$date2?$date1:$date2);
It's just using the one line form of an if statement. Note that the
function is incorrect if they date are equal.
On Tuesday, July 15, 2003, at 12:36 PM, Miguel Perez wrote:
I was wondering if there
describe user.
Paul Maine wrote:
I have a column defined in a table as type date. I desire to include a date
comparison in the WHERE clause of the following statement. The following
statement is not working correctly, I suspect that there is a formatting
issue. The statement returns true even
Paul,
Friday, August 16, 2002, 1:19:15 AM, you wrote:
PM I have a column defined in a table as type date. I desire to include a date
PM comparison in the WHERE clause of the following statement. The following
PM statement is not working correctly, I suspect that there is a formatting
PM issue.
Just when I thought I was getting the hang of this mysql stuff, the simplest
of tasks
is causing me to think about pulling my hair out.
My table:
NEWS {
newsID (INT(3), AUTO-INCREMENT),
newsTitle (VARCHAR (50)),
newsText (BLOB),
newsDate (DATE)
}
It's better to
At 8:22 PM -0700 9/15/01, Carl Schrader wrote:
MYSQL
I have a table with a date field. I have a query that needs to output
only if NOW()ed3(date field) ed2 is datetime.
ed3? ed2?
The issue is this:
select * from thesites where ED3NOW()
ED3='1999-12-31 00:00:00'
the above query will output
Cindy wrote:
SELECT
Foster_Dogs.dog_name,
Foster_Dogs.dog_status,
Foster_Dogs.date_resolved,
Foster_Dogs.adopting_family,
Foster_Dogs.foster_paperwork,
Foster_Dogs.dog_id,
Adoption_Applications.firstname,
Cindy wrote:
SELECT
Foster_Dogs.dog_name,
Foster_Dogs.dog_status,
Foster_Dogs.date_resolved,
Foster_Dogs.adopting_family,
Foster_Dogs.foster_paperwork,
Foster_Dogs.dog_id,
Adoption_Applications.firstname,
Steve Ruby writes:
Ignore my hasty and wrong response from moments ago. you should be fine
if date_resolved is a datetime type column if it is only a date you
will need to use date_format to convert your date_sub(now()) to a date,
otherwise the later returns datetime and cannot be compared
15 matches
Mail list logo