How to find difference between two dates in Qlik script?

The solution is here

fabs(Date(Field1,'DD/MM/YYYY')) - fabs(Date(Field2,'DD/MM/YYYY'))

For ex:

LOAD
    orderDate,
    desDate,
    delDate,
    fabs(Date(desDate,'DD/MM/YYYY')) - fabs(Date(orderDate,'DD/MM/YYYY')) as orderDespatchGap,
    fabs(Date(delDate,'DD/MM/YYYY')) - fabs(Date(orderDate,'DD/MM/YYYY')) as leadTime,
    fabs(Date(delDate,'DD/MM/YYYY')) - fabs(Date(desDate,'DD/MM/YYYY')) as despatchDeliveryGap
FROM [<DATA LOCATION>]


Popular posts from this blog

[Solved] Hive installation error: java.net.URISyntaxException: Relative path in absolute URI

Install Android SDK in centOs

Installing arules package (Association Rules) in R