I am trying to use sa_rowgenerator and am seeing some odd behavior concerning dates.

SELECT dateformat ( cast ('1998/00/01' as date ), 'yyyy/mm/DD' ); <- Returns January 1, 1998
SELECT dateformat ( cast ('1998/01/01' as date ), 'YYYY/MM/DD' ); <- Returns January 1, 1998

My issue is that when I'm using the sa_rowgenerator for two months of different years (e.g. Dec 2018 - Jan 2019), I'm getting duplicates for January. Is there any way to turn off this behavior?

asked 15 Jan, 13:48

Dan's gravatar image

Dan
11123
accept rate: 0%

edited 16 Jan, 11:40

Volker%20Barth's gravatar image

Volker Barth
33.8k332487717

Did you put MM and mm as month intentionally?

(16 Jan, 01:18) Vlad

FWIW, with V16.0.0.2704, the first returns SQLCODE = -157 ("Cannot convert '1998/00/01' to a timestamp").

As stated in that (related?) FAQ, this seems to be a bug in v17. What version do you use?

permanent link

answered 16 Jan, 03:52

Volker%20Barth's gravatar image

Volker Barth
33.8k332487717
accept rate: 33%

converted 16 Jan, 03:53

I'm also using v17, which is likely where the issue is. Any ideas on when this will be fixed?

(16 Jan, 09:30) Dan
Replies hidden

Hm, don't know as I'm just another customer – but I assume the SQL Anywhere folks like Mark will add details in the mentioned FAQ.

(16 Jan, 11:40) Volker Barth
1

(17 Jan, 08:23) Breck Carter
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×136
×6

question asked: 15 Jan, 13:48

question was seen: 202 times

last updated: 17 Jan, 08:23