# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor III

## Difference of two dates

Hi All,

i want date differences. i have date as TranDateNum... i am calculating like  TranDateNum-above(TranDateNum) but i   failed to get the result

10 Replies
Honored Contributor II

## Re: Difference of two dates

are you sure you have only one TranDateNum value for dimensions ?

give a try with below:

TranDateNum - Above( Only(TranDateNum) )

New Contributor III

## Re: Difference of two dates

Hello Andrea,

i am sure there is only one TranDateNum .

TranDateNum - Above( Only( TranDateNum) )    --->   let me try with this.

MVP

## Re: Difference of two dates

Try this as well might be it should worked

=TranDateNum - DATE( Above(TranDateNum) )

Or

=INTERVAL( TranDateNum - DATE(Above(TranDateNum) ) ,'DD')

New Contributor III

## Re: Difference of two dates

Hi Anand,

i  have a doubt TranDateNum in in Number format if i use DATE(Above(TranDateNum)) it will convert into date format.

how can i subtract num with date.

MVP

## Re: Difference of two dates

Ohh then convert first it into date format may help you change into your desired date format.

=Date(TranDateNum) - DATE( Above(TranDateNum) )

Or

=INTERVAL( Date(TranDateNum) - DATE(Above(TranDateNum) ) ,'DD')

New Contributor III

## Re: Difference of two dates

in above picture Trandate is already in date format

in the above i am not able to get values for            Above(TranDatenum)

Honored Contributor II

## Re: Difference of two dates

try change the expression in Above(TranDatenum) to see what you get for the first two rows.

New Contributor III

## Re: Difference of two dates

for Above(TranDatenum) i am not getting any values.

i am not getting what is the problem . can you suggest me any solution.

MVP

## Re: Difference of two dates

Then why you write previous "TranDateNum in in Number format" please check format once.