Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

problem with duplicate dates

in the source database- we have 1 field with date and time.

In script I try to make form this field 2 fileds - 1- date and 2- time,

but the proble is that QV creates from 1 to 8 same values of date.

for example many values of 31.08.2011

how to tell QV to make only 1 date value for all data with the same date?

1 Solution

Accepted Solutions
mov
Not applicable

problem with duplicate dates

Dmitry,

I do not open attchements, so the following is just my guess.
If you have two values:
Oct 28 2011 10:30
Oct 28 2011 10:40
And, you format it as date:
date(<datetimefield>)
You get two "values of the same date" because the undelying data is different.  To make it "real" date, you have to use integer part of your field as date, and fraction part as time:
date(floor(<datetimefield>)) as Date
time(frac(<datetimefield>)) as Time

2 Replies
mov
Not applicable

problem with duplicate dates

Dmitry,

I do not open attchements, so the following is just my guess.
If you have two values:
Oct 28 2011 10:30
Oct 28 2011 10:40
And, you format it as date:
date(<datetimefield>)
You get two "values of the same date" because the undelying data is different.  To make it "real" date, you have to use integer part of your field as date, and fraction part as time:
date(floor(<datetimefield>)) as Date
time(frac(<datetimefield>)) as Time

Not applicable

problem with duplicate dates

Great thanks