MySQL 8.x GA release date?

2017-11-02 Thread Tim Holme
Is there a planned release date for MySQL 8.x generally available release?

Re: mysql query for current date accounting returns NULL

2016-03-26 Thread shawn l.green
On 3/26/2016 4:36 PM, shawn l.green wrote: On 3/25/2016 6:39 AM, JAHANZAIB SYED wrote: I have Freeradius 2.x with MySQL 5.5 in Ubuntu. I want to query user quota for current date. I am using following code SELECT (SUM(acctinputoctets)+SUM(acctoutputoctets)) AS Total FROM radacct where

Re: mysql query for current date accounting returns NULL

2016-03-26 Thread shawn l.green
On 3/25/2016 6:39 AM, JAHANZAIB SYED wrote: I have Freeradius 2.x with MySQL 5.5 in Ubuntu. I want to query user quota for current date. I am using following code SELECT (SUM(acctinputoctets)+SUM(acctoutputoctets)) AS Total FROM radacct where (acctstarttime between DATE_FORMAT(NOW(),'

Re: mysql query for current date accounting returns NULL

2016-03-25 Thread Hal.sz S.ndor
2016/03/25 06:39 ... JAHANZAIB SYED: I want to query user quota for current date. I am using following code SELECT SUM(acctinputoctets)+SUM(acctoutputoctets) AS Total FROM radacct where (acctstarttime between DATE_FORMAT(NOW(),'%Y-%m-%d') AND NOW() AND acctstoptime between DATE_

mysql query for current date accounting returns NULL

2016-03-25 Thread JAHANZAIB SYED
I have Freeradius 2.x with MySQL 5.5 in Ubuntu. I want to query user quota for current date. I am using following code SELECT (SUM(acctinputoctets)+SUM(acctoutputoctets)) AS Total FROM radacct where (acctstarttime between DATE_FORMAT(NOW(),'%Y-%m-%d') AND NOW() AND acctstoptim

Re: Using INTEGER instead of VARCHAR/DATE - is this a way to faster access?

2014-11-06 Thread Zbigniew
2014-11-06 21:49 GMT+01:00, Roberta Jaskólski : > Ugh--I missed the discussion shift from the DATEs to the VARCHAR labels ... > and now I wholeheartedly agree with you. > > As for the DATEs, I yet suspect that for performance maybe TIMESTAMP is > slightly better than DATE.

Re: Using INTEGER instead of VARCHAR/DATE - is this a way to faster access?

2014-11-06 Thread Roberta Jask�lski
ing them! <<<<<<<< Ugh--I missed the discussion shift from the DATEs to the VARCHAR labels ... and now I wholeheartedly agree with you. As for the DATEs, I yet suspect that for performance maybe TIMESTAMP is slightly better than DATE. -- MySQL General Mailing List F

Re: Using INTEGER instead of VARCHAR/DATE - is this a way to faster access?

2014-11-04 Thread Jan Steinman
> From: (Halász Sándor) h...@tbbs.net > > 2014/10/29 20:56 +0100, Zbigniew > if instead of textual labels I'll use SMALLINT as simple integer "code" for > each different "label" (and in my program a translation table)? > > This, in effect, is ENUM... Well, not really! With I

Re: Using INTEGER instead of VARCHAR/DATE - is this a way to faster access?

2014-11-04 Thread Johan De Meersman
- Original Message - > From: "Zbigniew" > Subject: Using INTEGER instead of VARCHAR/DATE - is this a way to faster > access? >> What about using ENUMs? They have nearly the performance of INTEGERs, but >> you don't have to maintain a string mapping

Re: Using INTEGER instead of VARCHAR/DATE - is this a way to faster access?

2014-11-03 Thread Hal�sz S�ndor
>>>> 2014/11/02 13:19 +0100, Zbigniew >>>> So you guys (Jan and "hsv") suggest, that switching from DATE to "more numeric" data type may not be necessary, but using ENUM instead of VARCHAR can be real performance gain, right? But are you able to est

Re: Using INTEGER instead of VARCHAR/DATE - is this a way to faster access?

2014-11-02 Thread Jan Steinman
> From: Zbigniew > >> switching from DATE to "more numeric" data type may not be necessary... I would hope that the query optimizer converts '2014-11-02' to the three-bytes internal representation of DATE before doing the query, in which case, DATE should ac

Re: Using INTEGER instead of VARCHAR/DATE - is this a way to faster access?

2014-11-02 Thread Zbigniew
2014-10-31 5:29 GMT+01:00, Jan Steinman : > What about using ENUMs? They have nearly the performance of INTEGERs, but > you don't have to maintain a string mapping in your programming logic. So you guys (Jan and "hsv") suggest, that switching from DATE to "more num

Re: Using INTEGER instead of VARCHAR/DATE - is this a way to faster access?

2014-10-30 Thread Jan Steinman
> From: Zbigniew > > Now to the point: considering, that the second column shall contain > about 100-200 different "labels" - so in average many of such labels > can be repeated one million times (or even more) What about using ENUMs? They have nearly the performance of INTEGERs, but you don't

Re: Using INTEGER instead of VARCHAR/DATE - is this a way to faster access?

2014-10-30 Thread Jan Steinman
> From: Zbigniew > > Now to the point: considering, that the second column shall contain > about 100-200 different "labels" - so in average many of such labels > can be repeated one million times (or even more) What about using ENUMs? They have essentially the performance of INTEGERs, but you

Re: Using INTEGER instead of VARCHAR/DATE - is this a way to faster access?

2014-10-30 Thread hsv
done with something like "...WHERE label='xyz' AND date='2013-02-25' " (and maybe the insertion as well?), if instead of textual labels I'll use SMALLINT as simple integer "code" for each different "label" (and in my program a translation table)?

Using INTEGER instead of VARCHAR/DATE - is this a way to faster access?

2014-10-29 Thread Zbigniew
I'm going to establish a large database (ISAM) of simple structure, say the table with only 3 columns: - VARCHAR(80) - VARCHAR(40) - DATE The number of rows can be quite large, about hundred million or so. The first column, containing actual information, will contain unique values, unlik

RE: converting numeric to date-time?

2014-09-06 Thread hsv
>>>> 2014/09/04 08:40 -0700, Jan Steinman >>>> > From: "Ed Mierzwa (emierzwa)" > > > FROM_UNIXTIME(1409304102.153) /*your epoch column here*/ I don't think the OP has a Unix timestamp. The number looks suspeciously like concatenation of

Re: converting numeric to date-time?

2014-09-05 Thread Johan De Meersman
- Original Message - > From: "Jan Steinman" > Subject: RE: converting numeric to date-time? > > I don't think the OP has a Unix timestamp. OP explicitly says "epoch including milliseconds" - so it's going to be three digits too long :-) divide

Re: converting numeric to date-time?

2014-09-05 Thread Glyn Astill
> From: Jan Steinman >To: mysql@lists.mysql.com >Sent: Thursday, 4 September 2014, 16:40 >Subject: RE: converting numeric to date-time? > > >> From: "Ed Mierzwa (emierzwa)" >> >> >> FROM_UNIXTIME(1409304102.153)/*your epoch column

RE: converting numeric to date-time?

2014-09-04 Thread Jan Steinman
> From: "Ed Mierzwa (emierzwa)" > > > FROM_UNIXTIME(1409304102.153) /*your epoch column here*/ I don't think the OP has a Unix timestamp. The number looks suspeciously like concatenation of date digits, "140930" at the beginning looks like September 30, 2

RE: converting numeric to date-time?

2014-09-02 Thread Ed Mierzwa (emierzwa)
mber 01, 2014 5:51 PM To: Rajeev Prasad Cc: MYSQL General List Subject: Re: converting numeric to date-time? * Rajeev Prasad [2014-09-01 17:55]: > I have a column in a table which is epoch time including milliseconds. > > e.g. = 1409304102153 > > > now i want to display all

Re: converting numeric to date-time?

2014-09-01 Thread Philip Amadeo Saeli
s in ) > > > and i am not finding anything on web about how to do that. > > can anyone help please. > > ty. > Rajeev I do not know how to do it directly in MySQL, but if you can dump the table and post-process, this may be helpful on Linux: The date(1) cmd can translate

converting numeric to date-time?

2014-09-01 Thread Rajeev Prasad
I have a column in a table which is epoch time including milliseconds. e.g. = 1409304102153 now i want to display all fields in the table but this field as: "2014-8-29 Fri 09:21:42: GMT" (whatever comes in ) and i am not finding anything on web about how to do that. can anyone help

Re: MySQL 5.7 release plan/date

2014-02-04 Thread Morgan Tocker
Hi Igor, > When MySQL 5.7 planned to be released as stable/production ready? We do not provide planned release dates. If I can recommend a video to watch about the release process, please watch Tomas Ulin’s Percona Live keynote April 2013: http://www.youtube.com/watch?v=OpHTV59I1gs Watch from

MySQL 5.7 release plan/date

2014-02-04 Thread Igor Dvorzhak
Hi all, When MySQL 5.7 planned to be released as stable/production ready? Best, Igor

Re: Date comparison help

2013-10-22 Thread hsv
27;t seem to work as expected. SELECT DATE_ADD(STR_TO_DATE('2013-350-00:00:00','%Y-%j-%H:%i:%S'),INTERVAL 2 DAY), NOW(), DATE_ADD(STR_TO_DATE('2013-350-00:00:00','%Y-%j-%H:%i:%S'),INTERVAL 2 DAY)STR_TO_DATE() returns a DATETIME value if the format stri

Re: Date comparison help

2013-10-22 Thread Michael Stroh
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

Re: Date comparison help

2013-10-22 Thread kitlenv
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 wrote: > 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 ex

Date comparison help

2013-10-22 Thread Michael Stroh
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 DATE_ADD(STR_TO_DATE('2013-350-00:

RE: From DATE_FORMAT and back to origin date in mysql date column

2013-07-24 Thread Rick James
I'm unclear on your task, but maybe this function will help: http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_str-to-date (It is confusing to have "dato" as both a column name and an alias.) > -Original Message- > From: Karl-Arne Gje

From DATE_FORMAT and back to origin date in mysql date column

2013-07-24 Thread Karl-Arne Gjersøyen
SELECT DATE_FORMAT(dato, '%e/%c/%Y') AS dato FROM transportdokument WHERE dato >= '2013-07-20' AND dato <= '2013-07-24' GROUP BY dato DESC is working perfect in my PHP file. But I need to transfer the date back from my norwegian formatted date to

Re: Retrieve the values from the table of its max date

2012-11-30 Thread walter harms
: >>>>> 2012/11/29 11:46 +0530, Trimurthy >>>> > i have a table which contains the columns > date,sname,age,item,quantity,units.my question is i want to retrieve all > the values from the table where date=maxdate group by sname how can i get > those val

RE: Retrieve the values from the table of its max date

2012-11-30 Thread Rick James
and answered many times on forums.mysql.com > -Original Message- > From: h...@tbbs.net [mailto:h...@tbbs.net] > Sent: Thursday, November 29, 2012 5:40 PM > To: mysql@lists.mysql.com > Subject: Re: Retrieve the values from the table of its max date > > >&g

Re: Retrieve the values from the table of its max date

2012-11-30 Thread hsv
>>>> 2012/11/29 11:46 +0530, Trimurthy >>>> i have a table which contains the columns date,sname,age,item,quantity,units.my question is i want to retrieve all the values from the table where date=maxdate group by sname how can i get those values. <<<<<<

Re: Issue regarding the import of the date from csv file to the table in the database in mysql

2012-11-15 Thread hsv
>>>> 2012/11/15 00:30 +0100, Mogens Melander >>>> I guess I'm sill learning. Does that mean that, if the last column in a load blabla. is a -00-00 terminated by ^n it might error ? Or are we talking ODBC ? <<<<<<<< Find it under LOAD DATA

Re: Issue regarding the import of the date from csv file to the table in the database in mysql

2012-11-14 Thread Mogens Melander
6:40 AM: Sorry, didn't mean to be rude. It's in there. On Thu, November 15, 2012 00:23, Mogens Melander wrote: > Dude, which part of RTFM did yoy miss? > > http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html > > On Wed, November 14, 2012 13:

Re: Issue regarding the import of the date from csv file to the table in the database in mysql

2012-11-14 Thread Mogens Melander
There are four columns in my table named like account_name, c1, c2 and > c3. Account name is the primary key and c1, c2 contain two different dates > and in the column c2 there are few fields showing /00/00, now i need > to get the date different(in days) > between the dates pres

Re: Issue regarding the import of the date from csv file to the table in the database in mysql

2012-11-14 Thread Mogens Melander
Dude, which part of RTFM did yoy miss? http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html On Wed, November 14, 2012 13:57, sagar bs wrote: > Hi, > > > There are four columns in my table named like account_name, c1, c2 and > c3. > Account name is the prim

Re: Issue regarding the import of the date from csv file to the table in the database in mysql

2012-11-14 Thread hsv
>>>> 2012/11/14 18:27 +0530, sagar bs >>>> There are four columns in my table named like account_name, c1, c2 and c3. Account name is the primary key and c1, c2 contain two different dates and in the column c2 there are few fields showing /00/00, now i need to ge

Re: Issue regarding the import of the date from csv file to the table in the database in mysql

2012-11-14 Thread sagar bs
Hi, There are four columns in my table named like account_name, c1, c2 and c3. Account name is the primary key and c1, c2 contain two different dates and in the column c2 there are few fields showing /00/00, now i need to get the date different(in days) between the dates present in the c1

Re: Issue regarding the import of the date from csv file to the table in the database in mysql

2012-11-14 Thread hsv
>>>> 2012/11/14 10:26 +0530, sagar bs >>>> As i have the data with some 25 variables in csv file and i need to import to mysql. The issue is that the date format in csv file is dd/mm/yyyy and mysql takes the date format like /mm/dd. The number of variables in the

Re: Issue regarding the import of the date from csv file to the table in the database in mysql

2012-11-14 Thread Mogens Melander
Did you change the target column to varchar before import ? On Wed, November 14, 2012 10:23, sagar bs wrote: > tried to import data as text, but its showing Operation failed with > exitcode 1 > > On Wed, Nov 14, 2012 at 1:12 PM, Mogens Melander > wrote: > >> Or you could

Re: Issue regarding the import of the date from csv file to the table in the database in mysql

2012-11-14 Thread sagar bs
tried to import data as text, but its showing Operation failed with exitcode 1 On Wed, Nov 14, 2012 at 1:12 PM, Mogens Melander wrote: > Or you could import the date as text and convert dates using: > > mysql> SELECT STR_TO_DATE('04/31/2004', '%m/%d/%Y'); &g

Re: Issue regarding the import of the date from csv file to the table in the database in mysql

2012-11-13 Thread Mogens Melander
Or you could import the date as text and convert dates using: mysql> SELECT STR_TO_DATE('04/31/2004', '%m/%d/%Y'); -> '2004-04-31' On Wed, November 14, 2012 06:13, Larry Martell wrote: > On Tue, Nov 13, 2012 at 9:56 PM, sagar bs wrote: >> Hi, &g

Re: Issue regarding the import of the date from csv file to the table in the database in mysql

2012-11-13 Thread Larry Martell
On Tue, Nov 13, 2012 at 9:56 PM, sagar bs wrote: > Hi, > > As i have the data with some 25 variables in csv file and i need to import > to mysql. > The issue is that the date format in csv file is dd/mm/ and mysql takes > the date format like /mm/dd. > The number of

RE: date-IFNULL-sum bug?

2012-10-08 Thread hsv
>>>> 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, an

RE: date-IFNULL-sum bug?

2012-10-08 Thread Rick James
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 th

date-IFNULL-sum bug?

2012-10-05 Thread hsv
Can anyone explain this to me? The first one seems quite wrong; the rest make perfect sense. mysql> select ifnull(date('1900/5/3'), date('1900/01/01')) + 1; +--+ | ifnull(date('1900/5/3&#x

Re: date comparison query

2012-03-17 Thread Hal�sz S�ndor
the types are not Unix timestamps. I would use TIMESTAMPDIFF, with a good unit. From the downloaded help file: >>>> Date arithmetic also can be performed using INTERVAL together with the + or - operator: date + INTERVAL expr unit date - INTERVAL expr unit <<<< but s

Re: date comparison query

2012-03-16 Thread Baron Schwartz
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 lit

date comparison query

2012-03-16 Thread Simon Wilkinson
Hi, I have a table that holds two datetime columns. I am trying to find values from this table that fall into specific time ranges, but am getting some strange results. For example, if I try to find rows where the difference between the two column is between 47 and 48 weeks, I get back a result

Re: Getting data from 2 tables if records have same date!

2012-03-01 Thread Shawn L Green
MERS.PHONE = CALLS.PHONE AND CALLS.DATE = "02/28/12" But based on your description: a) The customer was created on given date (Eg:- '02/28/12') b) The customer called on given date and the call was recorded in the Calls table There are possibly two different d

RE: Getting data from 2 tables if records have same date!

2012-03-01 Thread LUCi5R
-Original Message- From: Shawn L Green [mailto:shawn.l.gr...@oracle.com] Sent: Thursday, March 01, 2012 6:57 AM To: luc...@luci5r.com Cc: 'Johnny Withers'; mysql@lists.mysql.com Subject: Re: Getting data from 2 tables if records have same date! Try this: SELECT * FROM CUST

RE: Getting data from 2 tables if records have same date!

2012-03-01 Thread LUCi5R
t on that to understand what you're doing here. Thanks! ~~ LUCi5R e: luc...@luci5r.com w: http://www.luci5r.com -Original Message- From: Halász Sándor [mailto:h...@tbbs.net] Sent: Wednesday, February 29, 2012 2:57 PM To: mysql@lists.mysql.com Subject: Re: Getting data

RE: Getting data from 2 tables if records have same date!

2012-03-01 Thread LUCi5R
is the UNION ALL query that got the correct “86” records result: SELECT PHONE FROM ( (SELECT PHONE,DATE FROM CUSTOMERS) UNION ALL (SELECT PHONE,DATE FROM CALLS) ) results WHERE DATE = “02/28/12” GROUP BY PHONE; I would still like to explore the possibility of doing this using 1 single query

Re: Getting data from 2 tables if records have same date!

2012-03-01 Thread David Giragosian
;> but not in the CALLS table. The other 85 were in both tables. >> >> >> >> The above LEFT JOIN query gave me 69 records and quite a few duplicate >> entries. I'm trying to dissect it to understand what exactly it selected. >> >> >> >> Th

Re: Getting data from 2 tables if records have same date!

2012-03-01 Thread Shawn L Green
com Cc: mysql@lists.mysql.com Subject: Re: Getting data from 2 tables if records have same date! Sounds like you need to LEFT JOIN: SELECT * FROM CUSTOMERS LEFT JOIN CALLS ON CUSTOMERS.PHONE = CALLS.PHONE AND CALLS.DATE = "02/28/12" WHERE CUSTOMERS.DATE = "02/28/12"

Re: Getting data from 2 tables if records have same date!

2012-02-29 Thread Hal�sz S�ndor
AND (CALLS.PHONE IS NULL OR CALLS.DATE = "02/28/12") <<<<<<<< Exactly; but I believe that this is the right thing: SELECT * FROM CUSTOMERS LEFT JOIN CALLS USING(PHONE) WHERE CUSTOMERS.DATE = "02/28/12" OR CALLS.DATE = "02/28/12" If you have a

Re: Getting data from 2 tables if records have same date!

2012-02-29 Thread Andrés Tello
what about select customers.* from customers left join calls on (customers.date=calls.date) where customers.date="02/28/12"; of course date should be an index in both tables. I think it migth work On Wed, Feb 29, 2012 at 4:54 PM, LUCi5R wrote: > JW, > > > > I'm

RE: Getting data from 2 tables if records have same date!

2012-02-29 Thread LUCi5R
l@lists.mysql.com Subject: Re: Getting data from 2 tables if records have same date! Sounds like you need to LEFT JOIN: SELECT * FROM CUSTOMERS LEFT JOIN CALLS ON CUSTOMERS.PHONE = CALLS.PHONE AND CALLS.DATE = "02/28/12" WHERE CUSTOMERS.DATE = "02/28/12" But that

Re: Getting data from 2 tables if records have same date!

2012-02-29 Thread Johnny Withers
th same PHONE # (Customer > called many times - maybe even same day), but CUSTOMERS will only have a > single entry for a PHONE #. > > Here comes my problem ... > > I have a PHONE SEARCH box with the ability to define a date range; for > simplicity sake - we'll use just One D

Re: setting the default of a date field

2012-01-28 Thread william drescher
On 1/27/2012 6:00 PM, Peter Brawley wrote: On 1/27/2012 2:24 PM, william drescher wrote: On 1/27/2012 3:21 PM, Peter Brawley wrote: On 1/27/2012 11:18 AM, william drescher wrote: Is there a way to set the default of a date field to the date the record is generated ? bill Use a TIMESTAMP

Re: setting the default of a date field

2012-01-27 Thread Peter Brawley
On 1/27/2012 2:24 PM, william drescher wrote: On 1/27/2012 3:21 PM, Peter Brawley wrote: On 1/27/2012 11:18 AM, william drescher wrote: Is there a way to set the default of a date field to the date the record is generated ? bill Use a TIMESTAMP. Default DATE(TIME) columns with Triggers

Re: setting the default of a date field

2012-01-27 Thread william drescher
On 1/27/2012 3:21 PM, Peter Brawley wrote: On 1/27/2012 11:18 AM, william drescher wrote: Is there a way to set the default of a date field to the date the record is generated ? bill Use a TIMESTAMP. Default DATE(TIME) columns with Triggers. PB When I try ALTER TABLE `ptInfo` CHANGE

Re: setting the default of a date field

2012-01-27 Thread Peter Brawley
On 1/27/2012 11:18 AM, william drescher wrote: Is there a way to set the default of a date field to the date the record is generated ? bill Use a TIMESTAMP. Default DATE(TIME) columns with Triggers. PB -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To

Re: Date and Time

2012-01-08 Thread Govinda
> > 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 li

Re: Date and Time

2012-01-08 Thread Paul DuBois
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&#x

Re: Date and Time

2012-01-08 Thread Govinda
> 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:

Re: Date and Time

2012-01-08 Thread Donovan Brooke
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 w

Re: Date and Time

2012-01-08 Thread Peter Brawley
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 

Re: Date and Time

2012-01-08 Thread Andrew Moore
What's your problem/reason with how it is? Andy On Sun, Jan 8, 2012 at 8: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<http:/

Date and Time

2012-01-08 Thread Donovan Brooke
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 well? Thanks, Donova

Re: Deleting of records older than a specific date & time

2011-05-23 Thread a . smith
Quoting Machiel Richards : We need to be able to delete all data from the 2 tables that is older than the start of yesterday. Hi, I use this ver simple script to purge data from a syslog DB: #!/usr/local/bin/bash /usr/local/bin/mysql -u syslog -pmypasswd -e 'DELETE FROM Syst

Re: Deleting of records older than a specific date & time

2011-05-23 Thread John Daisley
sterday. > > The process of determining the rows manually is easy enough, > however we would like to cut out manual intervention and automate this > process. > > I have played around with trying to create a stored routine / > function which is then passed the dat

Deleting of records older than a specific date & time

2011-05-23 Thread Machiel Richards
at is older than the start of yesterday. The process of determining the rows manually is easy enough, however we would like to cut out manual intervention and automate this process. I have played around with trying to create a stored routine / function which is then passed the date

Re: Strange date behaviour

2011-03-31 Thread Roy Lyseng
-30 | +-+ 1 row in set (0.00 sec) Any ideas why this is wrong? Interval arithmetic is tricky... curdate() is 2011-03-31, which is the last date of March. Adding 6 months gives the last date of september, ie 2011-09

Strange date behaviour

2011-03-31 Thread Andrew Braithwaite
Hi, Mysql > select curdate() + interval 6 month - interval 6 month; +-+ | curdate() + interval 6 month - interval 6 month | +-+ | 2011-03-30 | +-

Re: Get date from unix_timestamp only up to the hour

2011-02-24 Thread Pintér Tibor
On 02/24/2011 05:56 PM, Nathan Sullivan wrote: > Bryan, > > Maybe something like this would work? > > select 1296158500 - (1296158500 % 3600) ah, yes, even this one: mysql> select now() - interval (unix_timestamp() % 3600) second; +---+ | now() -

Re: Get date from unix_timestamp only up to the hour

2011-02-24 Thread Bryan Cantwell
Yes perfect! Thanks, I knew I was over thinking this. On 02/24/2011 10:56 AM, Nathan Sullivan wrote: Bryan, Maybe something like this would work? select 1296158500 - (1296158500 % 3600) Hope that helps, Nathan On Thu, Feb 24, 2011 at 08:41:58AM -0800, Bryan Cantwell wrote: How would I go

Re: Get date from unix_timestamp only up to the hour

2011-02-24 Thread Pintér Tibor
On 02/24/2011 05:41 PM, Bryan Cantwell wrote: > How would I go about modifying a unix timestamp to actually represent > the 'top of the hour' that it represents? > For instance: > 1296158500 = 1/27/2011 2:01:40 PM > That is in the 2:00 pm hour, how can I find that out and modify it to > 1296158400

Re: Get date from unix_timestamp only up to the hour

2011-02-24 Thread Michael Dykman
If the timestmp is in seconds, the result is simply mod(timestamp,3600) - michael dykman On Thu, Feb 24, 2011 at 11:41 AM, Bryan Cantwell wrote: > How would I go about modifying a unix timestamp to actually represent the > 'top of the hour' that it represents? > For instance: > 1296158500 = 1

Re: Get date from unix_timestamp only up to the hour

2011-02-24 Thread Nathan Sullivan
Bryan, Maybe something like this would work? select 1296158500 - (1296158500 % 3600) Hope that helps, Nathan On Thu, Feb 24, 2011 at 08:41:58AM -0800, Bryan Cantwell wrote: > How would I go about modifying a unix timestamp to actually represent > the 'top of the hour' that it represents? > F

Get date from unix_timestamp only up to the hour

2011-02-24 Thread Bryan Cantwell
How would I go about modifying a unix timestamp to actually represent the 'top of the hour' that it represents? For instance: 1296158500 = 1/27/2011 2:01:40 PM That is in the 2:00 pm hour, how can I find that out and modify it to 1296158400 which = 1/27/2011 2:00:00 PM? -- MySQL General Mai

Re: Help with Date in Where Clause

2011-01-31 Thread Bruce Ferrell
ing to pull records from Midnight to midnight the previous day. >> I thought just passing the date (without time) would get it but I keep >> getting an empty record set. >> So looking for something that works a bit better. >> > select * from your_table where convert(

Re: Help with Date in Where Clause

2011-01-31 Thread Shawn Green (MySQL)
On 1/31/2011 15:12, Phillip Baker wrote: Greetings All, I am looking for a little help in setting a where clause. I have a dateAdded field that is a DATETIME field. I am looking to pull records from Midnight to midnight the previous day. I thought just passing the date (without time) would get

Re: Help with Date in Where Clause

2011-01-31 Thread Phillip Baker
Thank you very much Jørn Blessed Be Phillip "Never ascribe to malice what can be explained by incompetence" -- Hanlon's Razor On Mon, Jan 31, 2011 at 1:18 PM, Jørn Dahl-Stamnes wrote: > Jørn

Re: Help with Date in Where Clause

2011-01-31 Thread Jørn Dahl-Stamnes
On Monday 31 January 2011 21:12, Phillip Baker wrote: > Greetings All, > > I am looking for a little help in setting a where clause. > I have a dateAdded field that is a DATETIME field. > I am looking to pull records from Midnight to midnight the previous day. > I thought jus

Help with Date in Where Clause

2011-01-31 Thread Phillip Baker
Greetings All, I am looking for a little help in setting a where clause. I have a dateAdded field that is a DATETIME field. I am looking to pull records from Midnight to midnight the previous day. I thought just passing the date (without time) would get it but I keep getting an empty record set

Re: Loading date takes a long time after replication

2011-01-04 Thread Sairam Krishnamurthy
Any pointers on this issue ? Thanks, Sairam Krishnamurthy +1 612 859 8161 On 01/03/2011 01:51 AM, Ananda Kumar wrote: What is the output of "show full processlist" On Mon, Jan 3, 2011 at 1:10 PM, Sairam Krishnamurthy mailto:kmsram...@gmail.com>> wrote: Hi all, I set up replication

Re: Loading date takes a long time after replication

2011-01-02 Thread Sairam Krishnamurthy
Apparently nothing. Just the "Show process list" query. 70100 | | localhost | | Query |0 | NULL | show full processlist Thanks, Sairam Krishnamurthy +1 612 859 8161 On 01/03/2011 01:51 AM, Ananda Kumar wrote: What is the output of "show full processlist" On Mon, Jan 3, 2011 at 1:

Re: Loading date takes a long time after replication

2011-01-02 Thread Ananda Kumar
What is the output of "show full processlist" On Mon, Jan 3, 2011 at 1:10 PM, Sairam Krishnamurthy wrote: > Hi all, > > I set up replication some days back. Because of some internal issues we > canceled the replication and reset the master to be a normal database > server. But after this "revert"

Re: Loading date takes a long time after replication

2011-01-02 Thread Sairam Krishnamurthy
Hi all, I set up replication some days back. Because of some internal issues we canceled the replication and reset the master to be a normal database server. But after this "revert", the database is unusually slow. It was slow because of the discussion below when replication was on. But I wo

Re: Loading date takes a long time after replication

2010-12-06 Thread Raj Shekhar
In infinite wisdom Sairam Krishnamurthy wrote: > [1 ] > All, > > I have a situation. We have a very large database(gigabytes). When we > load the data in to the table, it will be huge again (20 million rows). > So in order to get good backup we set up a replication(master-slave > setup). But

Re: Loading date takes a long time after replication

2010-12-06 Thread Sairam Krishnamurthy
Thanks Guys. Let me check these options and will get back with the results. Thanks again. Thanks, Sairam Krishnamurthy +1 612 859 8161 On 12/06/2010 04:47 AM, Ananda Kumar wrote: Also, make sure your /tmp folder is on a separate and fast disk. We had similar issues and we moved /tmp folder fr

Re: Loading date takes a long time after replication

2010-12-06 Thread Ananda Kumar
Also, make sure your /tmp folder is on a separate and fast disk. We had similar issues and we moved /tmp folder from Local to SAN storage and it was quite fast. regards anandkl On Mon, Dec 6, 2010 at 4:10 PM, Johan De Meersman wrote: > Are you saying that mass inserts go much slower now that you

Re: Loading date takes a long time after replication

2010-12-06 Thread Johan De Meersman
Are you saying that mass inserts go much slower now that you've set up replication? In that case, I suspect you have your binlogs on the same disk as your data. Put the binary logs on separate disks, and you'll notice a dramatic increase in performance. On Mon, Dec 6, 2010 at 7:17 AM, Sairam Kri

Loading date takes a long time after replication

2010-12-05 Thread Sairam Krishnamurthy
All, I have a situation. We have a very large database(gigabytes). When we load the data in to the table, it will be huge again (20 million rows). So in order to get good backup we set up a replication(master-slave setup). But now, because of this setup, loading into the table takes hours whi

Re: Not to show until a certain date

2010-10-01 Thread Hank
I would argue that it's not a logical error. Typically, in my experience when something expires, the date of expiry is inclusive, and any date after expiry is not. Take any discount, coupon, or promotion -- if it expires on December 31, it's still available on that day. If an article

Re: Not to show until a certain date

2010-10-01 Thread Joerg Bruehe
Hi Hank, all! Hank wrote: > On Fri, Oct 1, 2010 at 2:34 PM, Joerg Bruehe wrote: >> Hi! >> >> >> Hank wrote: >>> On Wed, Sep 29, 2010 at 8:33 AM, Patrice Olivier-Wilson >>> wrote: On 9/28/10 8:33 PM, Chris W wrote: > SELECT * > FROM announcements > WHERE announcements_expir

RE: Not to show until a certain date

2010-10-01 Thread BMBasal
Your suggestion seems more elegant. However, you missed the mathematical meaning of "BETWEEN" in SQL: it is inclusive of both lower and upper bounds. In the case raised by Patrice Olivier-Wilson, when an announcement expires on announcements_expiredate, it should not show on that

  1   2   3   4   5   6   7   8   9   10   >