Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calendar Year problem

I have a strange problem with the date and the exact year of field. I have the declaration date:

SET DateFormat='YYYYMMDD';

....

....

SQL SELECT  F7000 as Data

FROM DataBase.dbo."TEST_0000";

the date is displayed correctly, unfortunately, in the calendar control in the list is the wrong value. What could be the problem?

data.jpg

5 Replies
yduval75
Partner - Creator III
Partner - Creator III

If you use it, you have the same problem ?

LOAD

Date(F7000) as Date;

SQL SELECT  F7000

FROM DataBase.dbo."TEST_0000";

Not applicable
Author

No it does not work

maxgro
MVP
MVP

I get your same result

but It seems you can solve it with the bold part  (see attachment)

SET DateFormat='YYYYMMDD';

....

....

load

Data,

date(Date#(Data)) as Data1;

SQL SELECT  F7000 as Data

FROM DataBase.dbo."TEST_0000";

1.png

whiteline
Master II
Master II

Hi.

Nice case.

The QV here assumes that F7000 field is just a number regardless of DateFormat settings.

Seems it's better than try to treat every suitable number as date.

In such cases there is no hope that QV will parse the timestamps implicitly.

its_anandrjs
Champion III
Champion III

Convert your date field into another resident

Date#(Date,'YYYYMMDD') as Date

or

Date(Date#(Date,'YYYYMMDD'),'YYYYMMDD') as Date


Hope this helps