Re: DateTime limits

2006-06-07 Thread Ben Clewett
Thanks for the information. I agree with what you say. There is just one comment I'd like to make. You are right that the TIMESTAMP has a specific range. I am comparing it to a date outside that range. This could cause problems. But I strongly believe that the SQL user, who in many cases

DateTime limits

2006-06-06 Thread Ben Clewett
To whom it may concern, I'm involved in lots of C# coding with several coders. I have a gripe with MySQL which may be easy to solve in future development. C# has two DateTime constants: DateTime.MinValue = '0001-01-01 00:00:00.000' DateTime.MaxValue = '-12-31 23:59:59.999'

Re: DateTime limits

2006-06-06 Thread Barry
Ben Clewett schrieb: To whom it may concern, I'm involved in lots of C# coding with several coders. I have a gripe with MySQL which may be easy to solve in future development. C# has two DateTime constants: DateTime.MinValue = '0001-01-01 00:00:00.000' DateTime.MaxValue = '-12-31

Re: DateTime limits

2006-06-06 Thread Ben Clewett
Hi Barry, This will happen when comparing against a TIMESTAMP field. CREATE TABLE a ( t TIMESTAMP ); SELECT * FROM a WHERE t '0001-01-01 00:00:00'; I understand that TIMESTAMP cannot handle this date. But I would hope to be able to compare against this date without MySQL giving the

Re: DateTime limits

2006-06-06 Thread Duncan Hill
On Tuesday 06 June 2006 15:38, [EMAIL PROTECTED] wrote: Quoting Barry [EMAIL PROTECTED]: Well my msql doesn't give me any errors using that query. neither a warning. Ditto. usemysql use test; Database changed mysql CREATE TABLE a ( t TIMESTAMP ); Query OK, 0 rows affected (0.27 sec)

Re: DateTime limits

2006-06-06 Thread cknipe
Quoting Barry [EMAIL PROTECTED]: Ben Clewett schrieb: Hi Barry, This will happen when comparing against a TIMESTAMP field. CREATE TABLE a ( t TIMESTAMP ); SELECT * FROM a WHERE t '0001-01-01 00:00:00'; Well my msql doesn't give me any errors using that query. neither a

Re: DateTime limits

2006-06-06 Thread JamesDR
Duncan Hill wrote: On Tuesday 06 June 2006 15:38, [EMAIL PROTECTED] wrote: Quoting Barry [EMAIL PROTECTED]: Well my msql doesn't give me any errors using that query. neither a warning. Ditto. usemysql use test; Database changed mysql CREATE TABLE a ( t TIMESTAMP ); Query OK, 0 rows affected

Re: DateTime limits

2006-06-06 Thread Ben Clewett
Hi Barry, This is what I get: mysql CREATE TABLE a ( t TIMESTAMP ); Query OK, 0 rows affected (0.25 sec) mysql SELECT * FROM a WHERE t '0001-01-01 00:00:00'; Empty set, 1 warning (0.00 sec) mysql SHOW WARNINGS;

Re: DateTime limits

2006-06-06 Thread Barry
Ben Clewett schrieb: Hi Barry, This will happen when comparing against a TIMESTAMP field. CREATE TABLE a ( t TIMESTAMP ); SELECT * FROM a WHERE t '0001-01-01 00:00:00'; Well my msql doesn't give me any errors using that query. neither a warning. This might be a problem with windows.

Re: DateTime limits

2006-06-06 Thread Barry
Ben Clewett schrieb: Hi Barry, This is what I get: mysql CREATE TABLE a ( t TIMESTAMP ); Query OK, 0 rows affected (0.25 sec) mysql SELECT * FROM a WHERE t '0001-01-01 00:00:00'; Empty set, 1 warning (0.00 sec) mysql SHOW WARNINGS;

Re: DateTime limits

2006-06-06 Thread Ben Clewett
Hi Barry, Well removing 'explicit' warnings for every user having problems with 3rd party modules would have mysql without any warnings nowadays ;) i think that your mono should get more stable. I completely take this on board. This is a bug outside MySQL. Warnings are very useful. When

Re: DateTime limits

2006-06-06 Thread Chris W
Ben Clewett wrote: (I know that TIMESTAMP has a far smaller date range than DATETIME. But all our data has to be time-zone independent. Therefore TIMESTAMP is the only field appropriate for our use.) try and see if this works SELECT * FROM a WHERE cast(t as datetime)

Re: DateTime limits

2006-06-06 Thread Michael Stassen
Ben Clewett wrote: snip C# has two DateTime constants: DateTime.MinValue = '0001-01-01 00:00:00.000' DateTime.MaxValue = '-12-31 23:59:59.999' snip MySQL really doesn't like these values, it shows warnings: +-+--+-+