on 2019 Jan 15 2:23 PM
If I run select Isdate('20190001'); I get 1 (true) I have tried running with SET TEMPORARY OPTION DATE_ORDER = 'YMD'; and it still returns true
If I run select ymd(2019, 00, 01); I get 2018-12-01 which indicates 2019, 00, 01 is not a valid date!
following example here http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc38151.1520/html/iqrefbb/I...
select Isdate('2019/00/01'); Still returns true
select Isdate('2019/01/00') correctly returns false
As Breck has pointed out, there is a change of behaviour in the isdate() and cast( ... as date ) functions in v17 and it is a bug. This will be fixed.
However, YMD() is functioning as expected. The v17 documentation (also v10, v11, etc) states that the year is adjusted if the month is out of range. (Note: the doc does not actually state how it is adjusted... that is left to the reader to figure out ;-)). The date is also adjusted accordingly if the day is out of range.
HTH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did we forget to document the new "I know you meant 01 instead of 00 feature in version 17"? Oh well, it'll be fixed.
> there is a change of behaviour
That's not a behavior change.
THIS is a behavior change...
It's a bug in Version 17...
SELECT @@VERSION, ISDATE('2019-00-01'); @@VERSION,ISDATE('2019-00-01') '9.0.2.2451',0 @@VERSION,ISDATE('2019-00-01') '10.0.1.4310',0 @@VERSION,ISDATE('2019-00-01') '11.0.1.3158',0 @@VERSION,ISDATE('2019-00-01') '12.0.1.4231',0 @@VERSION,ISDATE('2019-00-01') '16.0.0.2512',0 @@VERSION,ISDATE('2019-00-01') '17.0.9.4882',1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.