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/10/08 14:52 -0700, Rick James
Do not use + for DATE arithmetic!
Use, for example
+ INTERVAL 1 YEAR
No, those operations are well defined. Amongst the timestamp-functions there is
constant reference to numeric context, and character context--and well there
is, because there are no
Do not use + for DATE arithmetic!
Use, for example
+ INTERVAL 1 YEAR
-Original Message-
From: h...@tbbs.net [mailto:h...@tbbs.net]
Sent: Thursday, October 04, 2012 9:35 PM
To: mysql@lists.mysql.com
Subject: date-IFNULL-sum bug?
Can anyone explain this to me?
The first one
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
What's your problem/reason with how it is?
Andy
On Sun, Jan 8, 2012 at 8:21 PM, Donovan Brooke li...@euca.us wrote:
Hello, I'm doing an insert into with date and time type fields.
I was reading:
On 1/8/2012 2:21 PM, Donovan Brooke wrote:
Hello, I'm doing an insert into with date and time type fields.
I was reading:
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-literals.html
My question is: is the format always 'year month day'?.. or can we
save dates in 'month day year' as
Peter Brawley wrote:
On 1/8/2012 2:21 PM, Donovan Brooke wrote:
Hello, I'm doing an insert into with date and time type fields.
I was reading:
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-literals.html
My question is: is the format always 'year month day'?.. or can we
save dates in
What's your problem/reason with how it is?
I assume Andy means:
leave it stored as a timestamp type or datetime type, and when you need to
display it otherwise.. then covert with date()
-G
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
On Jan 8, 2012, at 2:21 PM, Donovan Brooke wrote:
Hello, I'm doing an insert into with date and time type fields.
I was reading:
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-literals.html
My question is: is the format always 'year month day'?.. or can we save dates
in 'month
leave it stored as a timestamp type or datetime type, and when you need to
display it otherwise.. then covert with date()
oops, Paul's post reminded me I was suggesting a PHP function here ^^^ ... and
this is the MySQL list.
-G
--
MySQL General Mailing List
For list archives:
mysql desc maintenance;
++--+--+-++---+
| Field | Type | Null | Key | Default| Extra |
++--+--+-++---+
| indate | date | YES | | NULL
Hagan,
Close but not quite what I asked for. The schema for your table is
what you get from SHOW CREATE TABLE `mytable`. It will show all the
indexes and, most imporatantly, make it trivial for someone trying to
assist you in your investigation to re-create your problem.
It is good to see the
Micheal,
Your query trouble shooting tip showed me my error - see below:
Sorry here is the SHOW CREATE TABLE:
mysql show create table `maintenance`;
+-+-
Hi John,
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-types.html includes
some information about acceptable literal forms for dates and times.
'Thu May 21 03:15:28 + 2009' is not an acceptable literal form but
this is how to parse it APART from the time zone component. I could not
Janek Bogucki wrote:
Hi John,
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-types.html includes
some information about acceptable literal forms for dates and times.
'Thu May 21 03:15:28 + 2009' is not an acceptable literal form but
this is how to parse it APART from the time zone
manipulation, nous ne pouvons accepter aucune responsabilité
pour le contenu fourni.
Date: Fri, 22 May 2009 07:14:58 -0600
From: john.l.me...@gmail.com
To: janek.bogu...@studylink.com
CC: mysql@lists.mysql.com
Subject: Re: Date Time
Janek Bogucki wrote:
Hi John,
http://dev.mysql.com/doc
Janek Bogucki wrote:
Hi John,
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-types.html includes
some information about acceptable literal forms for dates and times.
'Thu May 21 03:15:28 + 2009' is not an acceptable literal form but
this is how to parse it APART from the time zone
On Fri, May 22, 2009 at 12:42 PM, John Meyer john.l.me...@gmail.com wrote:
Janek Bogucki wrote:
Hi John,
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-types.html includes
some information about acceptable literal forms for dates and times.
'Thu May 21 03:15:28 + 2009' is not an
mysql select sysdate() from DUAL;
+-+
| sysdate() |
+-+
| 2009-05-21 17:37:13 |
+-+
i would get the proprt format is
i could CONVERT_TZ to work
can you get CONVERT_TZ to work ?
Martin Gainty
Hello mysql list,
As is very often the case, five minutes after I posted this, I found
the problem or solution, not sure it was the problem as I am not
convinced that mysql ought to get confused so easily. I changed
DATE_FORMAT( `Messages`.`Date`, '%D %M %Y' ) AS Date,
DATE_FORMAT(
Hi,
Christian High wrote:
I have a table that includes a date and a scale reading like
datescale_reading
2007-08-01 150
2007-08-02 125
these reading may or may not be taken everyday. I need to develop a
query that will subtract the scale reading on one day from the
On 8/14/07, Baron Schwartz [EMAIL PROTECTED] wrote:
Hi,
Christian High wrote:
I have a table that includes a date and a scale reading like
datescale_reading
2007-08-01 150
2007-08-02 125
these reading may or may not be taken everyday. I need to develop
On Aug 14, 2007, at 8:38 AM, Christian High wrote:
On 8/14/07, Baron Schwartz [EMAIL PROTECTED] wrote:
Hi,
Christian High wrote:
I have a table that includes a date and a scale reading like
datescale_reading
2007-08-01 150
2007-08-02 125
these reading may or
Hi,
Christian High wrote:
On 8/14/07, Baron Schwartz [EMAIL PROTECTED] wrote:
Hi,
Christian High wrote:
I have a table that includes a date and a scale reading like
datescale_reading
2007-08-01 150
2007-08-02 125
these reading may or may not be taken everyday. I
On 8/14/07, Baron Schwartz [EMAIL PROTECTED] wrote:
Hi,
Christian High wrote:
On 8/14/07, Baron Schwartz [EMAIL PROTECTED] wrote:
Hi,
Christian High wrote:
I have a table that includes a date and a scale reading like
datescale_reading
2007-08-01 150
Hi Christian,
Christian High wrote:
I have a table that includes a date and a scale reading like
datescale_reading
2007-08-01 150
2007-08-02 125
these reading may or may not be taken everyday. I need to develop a
query that will subtract the scale reading on one
# of days since the first of the month from last month
datediff(now(),date(concat(period_add(date_format(now(),'%Y%m'),-1),'01')))
the # of days since the end of last month (e.g. from 5/31/07)
datediff(now(),date_sub(concat(date_format(now(),'%Y-%m-'),'01'),INTERVAL
1 DAY))
PB
-
There is also a LAST_DAY() function that returns the last day of the month:
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
Peter Brawley wrote:
# of days since the first of the month from last month
Is it possible in mysql to create a date field that stores year and month
only (-MM) without having to zero out the day or use varchar type fields
Best here is to just use a DATE field, then use DATE_FORMAT when you
want to pull up the customized date. It will get stored as a timestamp
Thanks...
My issue is not storage, it is confidentiality.
I am not allowed to store the day of birth as it is considered identifying
information (in medical records).
I do not even have the day, I want to pass a date in format (-MM) to a
date field if possible.
On 1/15/07 11:37 AM, Chris
Olaf Stein wrote:
Thanks...
My issue is not storage, it is confidentiality.
I am not allowed to store the day of birth as it is considered identifying
information (in medical records).
I do not even have the day, I want to pass a date in format (-MM) to a
date field if possible.
Pass the
Assign all dates to have a day of 01
Store in a date field, use DATE_FORMAT to just extract the MM and .
As you don't have the real day information it doesn't matter what day is used,
so long as it present in all months.
Hope this helps
Robert Gehrig
Webmaster at www.gdbarri.com
e-mail:
OK, thank you. How is the speed of this index compared with an indexed
date column if I do:
year_number='x' and month_number='y' and day_number='z';
They should have about the same cardinality, right?
Thanks,
Anders
Chris wrote:
Anders Lundgren wrote:
One potential solution might be to
.
- Original Message -
From: Anders Lundgren [EMAIL PROTECTED]
To: Dan Buettner [EMAIL PROTECTED]
Cc: Thomas Bolioli [EMAIL PROTECTED]; mysql@lists.mysql.com
Sent: Tuesday, January 09, 2007 8:34 PM
Subject: Re: Date v. DateTime index performance
One potential solution might be to use an extra
and the first day of the next month. That will
use an index.
- Original Message - From: Anders Lundgren [EMAIL PROTECTED]
To: Dan Buettner [EMAIL PROTECTED]
Cc: Thomas Bolioli [EMAIL PROTECTED]; mysql@lists.mysql.com
Sent: Tuesday, January 09, 2007 8:34 PM
Subject: Re: Date v. DateTime index
One potential solution might be to use an extra column that tracks
month_number, and populate it with a trigger on insert or update.
Index that field and then use it in your WHERE clause. One
possibility anyway.
Resulting question, what if I have three colums named year_number,
Anders Lundgren wrote:
One potential solution might be to use an extra column that tracks
month_number, and populate it with a trigger on insert or update.
Index that field and then use it in your WHERE clause. One
possibility anyway.
Resulting question, what if I have three colums
Thomas, I do not think in this case that one is better than the other,
for the most part, because both require using a value computed from
the column. Computing month from a DATE field should be just as fast
as computing from a DATETIME column I would think.
Also splitting into DATE and TIME
I've found something that works (in MySQL 5, anyway), but I don't know
whether it's accepted practice.
If I want to find all records with a date in, say, March 2006, it works if I
use datefield like '2006-03%' because it's a string.
This seems kind of obvious and a lot tidier than doing
I put one select on each question.
wizard007 [EMAIL PROTECTED] escreveu na mensagem
news:[EMAIL PROTECTED]
I have just started with MYSQL and am building a racing site using PHP.
I have Date, Course, Time, Horse, Odds, Result as my fields and the
database
is poulated with the data.
I'm
Hi,
Just tried the date format script posted but it returns the following error:
Parse error: parse error, unexpected '%' in
/homepages/7/d123417448/htdocs/PayGo/results_14days.php on line 33
I used $query_Recordset1 = SELECT date_format(Date, %d/%m/%Y) as Date,
Course, Time, Horse, Odds1,
On 13 Jul 2006 at 8:27, wizard007 wrote:
I used $query_Recordset1 = SELECT date_format(Date, %d/%m/%Y) as Date,
Course, Time, Horse, Odds1, Odds2, `Result` FROM Results;
Hi,
That's a PHP error because you have a double quotes: %d/%m/%Y within double
quotes: $query_Recordset1 = SELECT ..
From: Chris W Sent: 07 July 2006 09:23
It's late and I just gave up reading the manual. Can someone please
tell me the easiest way to do a query that will return all
rows with a
time stamp that is X number of seconds older than the current time?
Something like this.
SELECT *
Try this:
SELECT * FROM t
where TimeCol date_sub( now(), INTERVAL x SECOND )
Dan
On 7/7/06, Chris W [EMAIL PROTECTED] wrote:
It's late and I just gave up reading the manual. Can someone please
tell me the easiest way to do a query that will return all rows with a
time stamp that is X
The INTERVAL command is what you are looking for. It doesn't have to be SECOND
(with no S), you could use day, hour ,week, etc.
SELECT * FROM t WHERE TimeCol(now() - INTERVAL X SECOND)
http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html
- Original Message -
From:
Addison, Mark wrote:
From: Chris W Sent: 07 July 2006 09:23
It's late and I just gave up reading the manual. Can someone please
tell me the easiest way to do a query that will return all
rows with a
time stamp that is X number of seconds older than the current time?
Something like
Michael Stassen wrote:
So, take a look at yarn_date.txt and let us know.
Yes, you're right . . . there was an extra tab stop. When I deleted the
extra tab, the date field were retained successfully. Thanks!
--
Lola - mailto:[EMAIL PROTECTED]
http://www.lolajl.net | Blog at
Michael Stassen wrote:
Just a quick reply for now . . .
Ummm, if you delete the numbers to the *left* of the decimal point,
2005-01-15 10:15:42.41837 will turn into .41837, which is still not
a valid datetime. You need to delete the numbers to the *right* of the
decimal point (which I
Lola J. Lee Beno wrote:
snip
Here's an example of one of the tables where the date was retained
successfully, with the string to the right of the decimal point being
trimmed:
1Cobweb2005-01-13 15:21:50.654149
2Lace Weight2005-01-13 15:21:50.654149
3Sock2005-01-13
Lola J. Lee Beno wrote:
I have a bunch of data where one of the columns is a date field. Here's
a sample of the data that I have:
141415010001 02005-01-15 10:15:42.41837
281512010002 02005-01-15 10:22:37.756594
36
Thanx, that's exactly it. I feel a bit embarassed as this came up on
the list about 2-3 weeks ago, and I found the answer as I was waiting
for the replies.
-Sheeri
On 1/20/06, gerald_clark [EMAIL PROTECTED] wrote:
sheeri kritzer wrote:
Hi folks,
I'm attempting to optimize a query -- it's
Realized I should probably show the Bill_Sales table. . .
ls -lh Bill_Sales.*
-rw-rw 1 mysql mysql 104M Jan 20 15:11 Bill_Sales.MYD
-rw-rw 1 mysql mysql 97M Jan 20 15:11 Bill_Sales.MYI
-rw-rw 1 mysql mysql 9.2K Jan 3 13:43 Bill_Sales.frm
mysql show table status like Bill_Sales\G
sheeri kritzer wrote:
Hi folks,
I'm attempting to optimize a query -- it's quite a simple one, actually.
SELECT uid from Bill_Sales WHERE startDate '[some date]';
mysql show create table Bill_Sales\G
*** 1. row ***
Table: Bill_Sales
Hello.
MySQL doesn't support this syntax. See:
http://dev.mysql.com/doc/refman/5.0/en/create-table.html
If you want to automatically extract the year (month, day) part
from the inserted value, you may want to use TRIGGERS, however,
in my opinion, it is better to redesign your table
Hello.
Add composite index (tValidFrom, tValidTo) and use constant or variable
instead of now(). Force MySQL to use this composite index.
Mattias Håkansson wrote:
Hello People,
I have some indexing problem on using the fieldtype 'date' as
restriction in a query.
I use MySQL
Simply:
http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html
Just check the DATE_ADD part.
On 11/30/05, Peter Lauri [EMAIL PROTECTED] wrote:
Best group member,
I have a field called expiredate of type 'date'. I would like to add 17 days
to the expiredate without doing
SELECT DATE_ADD(expiredate, INTERVAL 17 DAYS)
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
Peter Lauri [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Best group member,
I have a field called expiredate of type 'date'. I would like to add 17 days
to the
You could use something like
from_unixtime(to_unixtime(dateField)+(86400*17))
I store dates in unix timestamp format in bigints whenever possible for
this very reason.
=C=
Peter Lauri wrote:
Best group member,
I have a field called expiredate of type ‘date’. I would like to add 17
Peter
Is there any function in MySQL that adds days to a date?
See ADDDATE(...) at
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html.
PB
-
Peter Lauri wrote:
Best group member,
I have a field called
expiredate of type date.
I would like to add 17
Can anyone tell me what advantages there are in keeping dates and times in
a MySQL DateTime field, as opposed to storing its string equivalent in a
Varchar field ?
Decent sorting, validity checking, being able to use the DATE and TIME
functions etc etc...
With regards,
Martijn Tonies
Database
Hello.
For example, the size of the field. DATETIME uses only 8 bytes. See:
http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html
Sinang, Danny wrote:
Hello,
Can anyone tell me what advantages there are in keeping dates and times
in a MySQL
DateTime field, as opposed
---snip--
Given any two dates, MySQL can tell if a third date is within
that range.
That's easy.
To actually return a list of all dates between any arbitrary
pair of dates requires some form of loop (v5.0+) or a lookup
into a table populated with all possible dates (any version
that
At 20:47 +0100 9/6/05, Shaun wrote:
Hi,
Given two dates, can Mysql calculate and return all the dates that occur
between them?
No.
Given two dates, MySQL can determine which of a set of already-existing
dates stored in a table occur between them and return those.
--
Paul DuBois, MySQL
Shaun [EMAIL PROTECTED] wrote on 09/06/2005 03:47:25 PM:
Hi,
Given two dates, can Mysql calculate and return all the dates that occur
between them?
Thanks for your advice.
Given any two dates, MySQL can tell if a third date is within that range.
That's easy.
To actually return
Barbara,
... I don't know if I'm being asked to add or subtract days...
Why would you want to know that? ADDDATE() doesn't care:
SET @x = -1;
SELECT ADDDATE('1975-1-1', INTERVAL @x DAY);
+--+
| ADDDATE('1975-1-1', INTERVAL @x DAY) |
Do You know about INTERVAL?
Use it in an exprecssion or funtion as
..INTERVAL expr type
where expr is any numerical value
* The INTERVAL keyword and the type specifier are not case
sensitive.
The following table shows how the type
Barbara Deaton [EMAIL PROTECTED] wrote on 08/23/2005 03:36:52 PM:
All,
I know MySQL comes with all sorts of wonderful functions to do date
arithmetic, the problem is the context that my application is being
called in I don't know if a user wants me to add or subtract days.
I'm just
Unfortunately no, because I don't know if I'm being asked to add or subtract
days. I'm just given a value, and have to transform that into something that
can be added or subtracted.
So for example, all I get with is value 1 meaning 1 day and I need to do
something with a date, for db2
Barbara Deaton wrote:
All,
I know MySQL comes with all sorts of wonderful functions to do date
arithmetic, the problem is the context that my application is being
called in I don't know if a user wants me to add or subtract days. I'm
just given the number of days that need to be either
[EMAIL PROTECTED] wrote:
snip
You are right. There are a lot of date functions in MySQL. However, I am
not sure exactly what your needs are...
I think you are trying to compute date intervals (did you NOT see the
INTERVAL keyword when you RTFM?). Most of the date functions currently
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
Hello.
You said that you had created a view, but you continued using Tab_A
instead of Tab_A_View in your next queries. Did you want to use view
Tab_A_View? On my MySQL 5.0.9 all queries works both with view and
original table. See:
mysql desc Tab_A;
Anoop kumar V [EMAIL PROTECTED] wrote on 04/29/2005 11:00:11 AM:
Is it possible to do a date field validation using an sql query.
Its like we have an html field- its a free form text field and the end
user
should type in a valid date, of course in a predefined format only
(MM/dd/yyy). I
So is there a function in mysql that I can call to validate dates??
Or do I need to build it?
Thanks,
Anoop
On 4/29/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Anoop kumar V [EMAIL PROTECTED] wrote on 04/29/2005 11:00:11 AM:
Is it possible to do a date field validation using an sql
You could try checkdate()...
chris
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
You can, sort of. You can use a type of query like this:
select if(now()'2005-04-28', 1, 0);
Which will return a 1 or a 0 if the date is greater than the current
date/time. But that's a very weak comparison, prone to error, since the
date must be in the MySQL readable format. So while you could
Anoop
snip
You could try checkdate()...
/snip
Apologies for erroneous advice - I am evidently suffering from list psychosis...
Chris
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
No problem - I followed up and found out that this function is not
available. THought probably you were referring to a later version of Mysql..
anyways...
We use Java - and maybe I could use that - I was just wondering if I could
help reinventing something already there.
Thanks so much for
kumar V [EMAIL PROTECTED]
To: Chris Ramsay [EMAIL PROTECTED]; mysql@lists.mysql.com
Sent: Friday, April 29, 2005 6:10 PM
Subject: Re: Date validation using mysql
No problem - I followed up and found out that this function is not
available. THought probably you were referring to a later version
Subject: Re: Date validation using mysql
No problem - I followed up and found out that this function is not
available. THought probably you were referring to a later version of
Mysql..
anyways...
We use Java - and maybe I could use that - I was just wondering if I could
help reinventing
On Wed, Apr 06, 2005 at 12:06:37PM +0200, Hans Bernard wrote:
i need to have the time in this output. in MySQL database
phpmyadmin always puts -00-00
i need it to be like this
01-APR-2005 DD-MMM-
Use date_format(, %d-%b-%Y %H:%m) in your SELECT?
bye,
-christian-
--
MySQL
- Original Message -
From: Hans Bernard [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Wednesday, April 06, 2005 6:06 AM
Subject: DATE TIME
Hello,
i need to have the time in this output. in MySQL database
phpmyadmin always puts -00-00
i need it to be like this
thanks for the hints date_format() solved my problem my select query in php is
now
the following:
$query = SELECT id, calltt, date_format(calldate, '%d-%b-%Y') AS calldate2,
date_format(calltime, '%H:%i') AS calltime2,area, problem, solution, assignto,
status FROM ticketing ;
hans
Rhino
Clarence wrote:
I have a log table that records certain transactions on one of my sites.
I'm using a timestamp field to mark the date/time of each transaction.
I'm trying to run a query that will display the transactions by date
using the following SQL:
SELECT COUNT(log_id) AS total,
Shoot me now, please.
Thanks - I don't know how I missed that! Thanks - re-ran the query and
things seem to be a-ok!
On Wed, 23 Feb 2005 18:42:17 +0100, Roger Baklund [EMAIL PROTECTED] wrote:
Clarence wrote:
I have a log table that records certain transactions on one of my sites.
I'm using
From: René Fournier [mailto:[EMAIL PROTECTED]
I'm trying to count rows that were added today. The column that I am
counting on is in DATETIME format, so there are hours and minutes and
seconds recorded, but I only need to check the date
$sql =SELECT
Mike Johnson wrote:
From: René Fournier [mailto:[EMAIL PROTECTED]
I'm trying to count rows that were added today. The column that I am
counting on is in DATETIME format, so there are hours and minutes and
seconds recorded, but I only need to check the date
$sql = SELECT
Minh La wrote:
So far the hours that I have spent have been in vain.
Next time a couple of minutes with the Fine Manual instead? :-)
I tried using str_to_date, but it keeps failing.
Looks like it's not in version 4.0.2?
Quoting the FM:
STR_TO_DATE() is available as of MySQL 4.1.1.
FWIW,
--
Minh La wrote:
Hi, Can some help me with a date conversion problme
that I am having.
I have a date data in the following format:
'Month Days Year Hour:Minute AM/PM'
Example: 'Aug 21, 2004 2:00 PM'
So far the hours that I have spent have been in vain.
I tried using str_to_date, but it keeps
- Original Message -
From: darrell troth [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 26, 2004 3:29 PM
Subject: Date query and date removal
This will seem an easy question, but I cannot find a sample anywhere:
I have a database of bands appearing at a club. I want
- Original Message -
From: darrell troth [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 26, 2004 3:29 PM
Subject: Date query and date removal
This will seem an easy question, but I cannot find a sample anywhere:
I have a database of bands appearing at a club. I want
- Original Message -
From: Jerry Swanson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 11:20 AM
Subject: date type select
I have comlumn in mysql type datetime. I need to get the date in DATE
format.
select DATE(reg_date) as test from a1;
It gives me an
What version of MySQL are you running? If you are on a version of 4.1 or
higher, you have many more options than if you aren't.
(I would refer you to the online manual but it seems to be busy right now
and I can't get to the URL I need.)
Shawn Green
Database Administrator
Unimin Corporation -
Ferhat BINGOL wrote:
Hi Scoot,
I do my table structure like that
CREATE TABLE `test_table` (
`timestamp` date NOT NULL default '-00-00',
`data` varchar(5) NOT NULL default '',
PRIMARY KEY (`timestamp`),
KEY `timestamp` (`timestamp`)
) TYPE=MyISAM;
Correct me if I'm wrong, but I think
Scott Hamm wrote:
How do I create table that uses timestamp in -dd-mm format as primary id
(no duplicates)?
You can't.
Timstamps are only unique down to 1 second.
It is quite possible to insert hundreds, if not thousands of records in
that length of time.
--
MySQL General Mailing List
For
to prevent DateID duplication]
);
-Original Message-
From: gerald_clark [mailto:[EMAIL PROTECTED]
Sent: Monday, October 18, 2004 9:42 AM
To: Scott Hamm
Cc: 'Mysql ' (E-mail)
Subject: Re: Date as Primary ID
Scott Hamm wrote:
How do I create table that uses timestamp in
Hi Scoot,
I do my table structure like that
CREATE TABLE `test_table` (
`timestamp` date NOT NULL default '-00-00',
`data` varchar(5) NOT NULL default '',
PRIMARY KEY (`timestamp`),
KEY `timestamp` (`timestamp`)
) TYPE=MyISAM;
Than I send a query as below
INSERT INTO `test_table` (
1 - 100 of 299 matches
Mail list logo