Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

How to derive no. of days from date field.

Hi folks,

Situation is I want to calculate the no. of days a person been actively using a service. Based on a customers earliest period (date) of using the service till the current date of their usage, I would like to compute the no. of days.

Any idea on how to do so? Sample script?

Please advise. Thank you.

Best Regards,

R

1 Solution

Accepted Solutions
MVP
MVP

Re: How to derive no. of days from date field.

Take a straight table; Customer as dimension; expression, something like: Max(Date)-Min(Date)

It all depends on your data, how your records are being stored.

5 Replies

Re: How to derive no. of days from date field.

If you have 2 dates and you need to compute N° of days between them, simply

Num(Date2) - Num(Date1) gives you the number of days

Not applicable

Re: How to derive no. of days from date field.

Like this

 

=Date(Today())-Date(today()-100)

Note: Change according to your usage.

MVP
MVP

Re: How to derive no. of days from date field.

Take a straight table; Customer as dimension; expression, something like: Max(Date)-Min(Date)

It all depends on your data, how your records are being stored.

Not applicable

Re: How to derive no. of days from date field.

That just doesn't make any sense to me.

Not applicable

Re: How to derive no. of days from date field.

Thanks once again tres! Your a legend.

Community Browser