Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sybase timestamp problem

Hi,

I have problem to get timestamp field from Sybase through ODBC driver.  When I select from database connection a field that is timestamp, all the rows have same timestamp 1.1.1900 0:02:18

timestamp.gif

If I look from Sybase Interactive Sql timestamps looks better, although using same ODBC driver.

Sybase.gif

Any ideas, where th problem is?

7 Replies
tresesco
MVP
MVP

Let the preview be as it is. Try reloading like:

Load

          Date(Floor(Timestamp#(tit_erf_daz, 'DD.MM.YYYY hh:mm:ss'))) AS date

;

Select

          tit_erf_daz

From <Your data source>;

Do you get all the dates?

its_anandrjs

For your field in load script write a code like

Timestamp(tit_erf_daz,'DD.MM.YYYY hh:mm:ss') as tit_erf_daz

Or

Timestamp(Timestamp#(tit_erf_daz,'DD.MM.YYYY hh:mm:ss'),'DD.MM.YYYY hh:mm:ss') as tit_erf_daz

MK_QSL
MVP
MVP

Try below four different format in your script instead of tit_erf_daz. At least one should work..


1)     Timestamp(Timestamp#(tit_erf_daz,'D.M.YYYY hh:mm:ss')) as tit_erf_daz

2)     Timestamp(Timestamp#(tit_erf_daz,'D.MM.YYYY hh:mm:ss')) as tit_erf_daz

3)     Date(FLOOR((Timestamp#(tit_erf_daz,'D.M.YYYY hh:mm:ss'))) as tit_erf_daz

4)      Date(FLOOR((Timestamp#(tit_erf_daz,'D.MM.YYYY hh:mm:ss'))) as tit_erf_daz

Not applicable
Author

I tried, but same result. All timestamps same.

time.gif

PrashantSangle

Hi,

Looks like it is issue of date format.

Simply load in your report.

Then try to change format in Number tab

go to number tab->select Override setting->then select date format.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
its_anandrjs

Try this it definitely works

Date(FLOOR((Timestamp#(tit_erf_daz,'DD.MM.YYYY hh:mm:ss')),'DD.MM.YYYY hh:mm:ss') as tit_erf_daz

Not applicable
Author

All suggestions tried, but result is still same.