Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

SELECT lastModifiedDate,DateFormat(lastModifiedDate,'') as dtFormatted FROM StatData WHERE DateFormat(lastModifiedDate,'hh') = '00'

Gives the result:
2010-10-25 00:0-43:03.592000 25.10.2010
2010-10-21 00:0-30:45.950000 21.10.2010
2010-10-13 00:0-40:34.216000 13.10.2010
2010-10-21 00:0-58:41.947000 21.10.2010
2010-10-25 00:0-43:03.592000 25.10.2010

What's with that?

mvh Ove B-)

asked 14 Feb '14, 02:35

Ove%20Halseth's gravatar image

Ove Halseth
accept rate: 0%


Please tell us the SQLA version you use

(14 Feb '14, 02:40) Martin

Yes, please tell us the version and build number that you are using. I just tried v16 and it seems to work as expected:

select cast( '2010-10-25 00:43:03.592000' as timestamp ) d, DateFormat(d,'')


2010-10-25 00:43:03.592   25.10.2010
(14 Feb '14, 12:56) Mark Culp
Comment Text Removed

That looks like a client or interface issue, since it is the first lastModifiedDate column that is corrupted (presumably a TIMESTAMP).

The DATEFORMAT column (which is a string) looks OK which implies the server is working OK.

So... what client software are you using? dbisql?

What interface? ODBC?

(14 Feb '14, 13:13) Breck Carter

Ah, I should have guessed, or at least tried isql...

We are using a rather old jconn4.jar, dated 27.01.2010, running against a dbsrv12 GA 12 0 1 3967 linux 2013/09/04 15:54:03 posix 64 production. Will try a newer driver and let you know.

Ove B-)

permanent link

answered 16 Feb '14, 05:19

Ove%20Halseth's gravatar image

Ove Halseth
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 14 Feb '14, 02:35

question was seen: 2,012 times

last updated: 16 Feb '14, 05:19