Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ilanbaruch
Specialist
Specialist

convert sum of days into week\month

how to convert sum of days into week\month (InvoiceDate-OrderDate)?

4 Replies
Not applicable

week(invoicedate) or month(invoicedae)

ilanbaruch
Specialist
Specialist
Author

when i calculate InvoiceDate minus Orderdate i have a num value in days (10,20 or 100 days) i want to show this value in weeks or months.

Not applicable

When using "sum of days" you should work with Intervals. In QlikView Intervals are periods of time between two moments or just a quantity of time. For example, if I want to know the number of days between two dates:

     =Interval(Date('05/11/2013', 'DD/MM/YYYY') - Date('01/01/2013', 'DD/MM/YYYY'), 'D')

To know the number of weeks divide by 7, and months by 30. To know based on a sum of days, replace the dates substraction by your number.

Not applicable

Try below:


For Days: Num#(text(interval(InvoiceDate-OrderDate 'D')))


For Weekd: Num#(text(interval(InvoiceDate-OrderDate 'D')))/7