Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

date format and date differences

hi all,

at the attached qw

i wanna

1)change Date format to DD/MM/YYYY

then

2) For every pilot i want to find

    a) the differences of dates

    b)sum of the differences of dates

    c)row number

     d)  b/c

you can find an axample at the excel

can u please help me thanks

1 Solution

Accepted Solutions
pover
Honored Contributor

Re: date format and date differences

I would recommend you do this in the script and not in the object, but you can use the following code to standardize your dates either in the script or as a calculated dimension.

=alt(date(Date,'MM/DD/YYYY'),date(floor(timestamp#(Date,'MM/DD/YYYY hh:mm:ss tt')),'MM/DD/YYYY'))

It's so complicated because some of your dates are strings and others are numbers.  Try to make the dates the same format in the source Excel file.

The rest of the graph is complicated for that reason, so I've attached the QV.

Karl

2 Replies
pover
Honored Contributor

Re: date format and date differences

I would recommend you do this in the script and not in the object, but you can use the following code to standardize your dates either in the script or as a calculated dimension.

=alt(date(Date,'MM/DD/YYYY'),date(floor(timestamp#(Date,'MM/DD/YYYY hh:mm:ss tt')),'MM/DD/YYYY'))

It's so complicated because some of your dates are strings and others are numbers.  Try to make the dates the same format in the source Excel file.

The rest of the graph is complicated for that reason, so I've attached the QV.

Karl

Not applicable

Re: date format and date differences

thank you very much

Community Browser