Re: one hour is/is not 60 minutes, that's the question...

2005-02-15 Thread Rich Lafferty
On Tue, Feb 15, 2005 at 06:48:08PM +0100, schlubediwup [EMAIL PROTECTED] 
wrote:
 Hi again mysql-listers
 
 
 mysql select addtime(now(), '00:60:00'); 
 ++
 | addtime(now(), '00:60:00') |
 ++
 | NULL   |
 ++
 1 row in set, 1 warning (0.00 sec)
^^

Did you check the warning (with SHOW WARNINGS)?

  -Rich

-- 
Rich Lafferty --+---
 Ottawa, Ontario, Canada|  Save the Pacific Northwest Tree Octopus!
 http://www.lafferty.ca/|http://zapatopi.net/treeoctopus.html
[EMAIL PROTECTED] ---+---

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: one hour is/is not 60 minutes, that's the question...

2005-02-15 Thread Martijn Tonies
Hello,

 mysql select version();
 ++
 | version()  |
 ++
 | 4.1.9-standard-log |
 ++
 1 row in set (0.00 sec)

 mysql

Although I'm not fully aware of MySQL time/date symantecs,
I would like to make a comment...


 mysql select addtime(now(), '00:00:00');
 ++
 | addtime(now(), '00:00:00') |
 ++
 | 2005-02-15 16:49:17|
 ++
 1 row in set (0.00 sec)

 mysql select addtime(now(), '00:60:00'); 

There's no such time.

00:60:00 is a duration, not a time. So I too wonder
what the warning was...

 ++
 | addtime(now(), '00:60:00') |
 ++
 | NULL   |
 ++
 1 row in set, 1 warning (0.00 sec)

 mysql select addtime(now(), '01:00:00');

This is a valid time. Namely, 01:00 AM.

 ++
 | addtime(now(), '01:00:00') |
 ++
 | 2005-02-15 17:50:27|
 ++
 1 row in set (0.00 sec)



 in my opinion the result of the second and third example above must be
 the same.

Perhaps there's another function to add durations?

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL  MS SQL
Server
Upscene Productions
http://www.upscene.com


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: one hour is/is not 60 minutes, that's the question...

2005-02-15 Thread Victor Pendleton
Is the DATE_ADD(time, INTERVAL) an option?
SELECT Now(), DATE_ADD(Now(), interval 60 minute)
schlubediwup wrote:
Hi again mysql-listers
mysql select version();
++
| version()  |
++
| 4.1.9-standard-log |
++
1 row in set (0.00 sec)
mysql
[EMAIL PROTECTED]:~ uname -a
Linux mydom 2.6.4-54.5-default #1 Fri May 7 21:43:10 UTC 2004 i686 
i686 i386 GNU/Linux
[EMAIL PROTECTED]:~


mysql select addtime(now(), '00:00:00');
++
| addtime(now(), '00:00:00') |
++
| 2005-02-15 16:49:17|
++
1 row in set (0.00 sec)
mysql select addtime(now(), '00:60:00'); 
++
| addtime(now(), '00:60:00') |
++
| NULL   |
++
1 row in set, 1 warning (0.00 sec)
mysql select addtime(now(), '01:00:00');
++
| addtime(now(), '01:00:00') |
++
| 2005-02-15 17:50:27|
++
1 row in set (0.00 sec)

in my opinion the result of the second and third example above must be 
the same.

suomi



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: one hour is/is not 60 minutes, that's the question...

2005-02-15 Thread Tom Crimmins
The minute part of a time expression only has a valid range of 0 to 59.

http://dev.mysql.com/doc/mysql/en/date-and-time-functions.html
http://dev.mysql.com/doc/mysql/en/time.html

---
Tom Crimmins
Interface Specialist
Pottawattamie County, Iowa
 

 -Original Message-
 From: schlubediwup [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, February 15, 2005 11:48
 To: mysql@lists.mysql.com
 Subject: one hour is/is not 60 minutes, that's the question...
 
 Hi again mysql-listers
 
 
 mysql select version();
 ++
 | version()  |
 ++
 | 4.1.9-standard-log |
 ++
 1 row in set (0.00 sec)
 
 mysql
 
 [EMAIL PROTECTED]:~ uname -a
 Linux mydom 2.6.4-54.5-default #1 Fri May 7 21:43:10 UTC 2004 
 i686 i686 
 i386 GNU/Linux
 [EMAIL PROTECTED]:~
 
 
 
 mysql select addtime(now(), '00:00:00');
 ++
 | addtime(now(), '00:00:00') |
 ++
 | 2005-02-15 16:49:17|
 ++
 1 row in set (0.00 sec)
 
 mysql select addtime(now(), '00:60:00'); 
 ++
 | addtime(now(), '00:60:00') |
 ++
 | NULL   |
 ++
 1 row in set, 1 warning (0.00 sec)
 
 mysql select addtime(now(), '01:00:00');
 ++
 | addtime(now(), '01:00:00') |
 ++
 | 2005-02-15 17:50:27|
 ++
 1 row in set (0.00 sec)
 
 
 
 in my opinion the result of the second and third example 
 above must be 
 the same.
 
 suomi

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: one hour is/is not 60 minutes, that's the question...

2005-02-15 Thread Harald Fuchs
In article [EMAIL PROTECTED],
schlubediwup [EMAIL PROTECTED] writes:

mysql select addtime(now(), '00:00:00');
 ++
 | addtime(now(), '00:00:00') |
 ++
 | 2005-02-15 16:49:17|
 ++
 1 row in set (0.00 sec)

mysql select addtime(now(), '00:60:00'); 
 ++
 | addtime(now(), '00:60:00') |
 ++
 | NULL   |
 ++
 1 row in set, 1 warning (0.00 sec)

mysql select addtime(now(), '01:00:00');
 ++
 | addtime(now(), '01:00:00') |
 ++
 | 2005-02-15 17:50:27|
 ++
 1 row in set (0.00 sec)

 in my opinion the result of the second and third example above must be
 the same.

Nope.  Leap seconds do not accumulate to leap minutes; thus there's no
hour with 60 minutes.  I'm not sure about the silent conversion to
NULL; PostgreSQL throws an error stating 'interval field value out of
range: 00:60:00'.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]