Tagged with datedif - Visokio Forums http://forums.visokio.com/discussions/tagged/datedif/feed.rss Mon, 30 Oct 17 15:53:56 -0400 Tagged with datedif - Visokio Forums en-CA Demo: Dynamic calculation of investments with different maturity dates http://forums.visokio.com/discussion/3033/demo-dynamic-calculation-of-investments-with-different-maturity-dates Tue, 17 Nov 2015 07:16:46 -0500 paola 3033@/discussions First step is calculation of number of days between today and the investment maturity date:
DATEDIFF(NOW, [Date], "days")  

By using NOW function, this calculation will keep the report up-to-date, always returning the latest breakdown.
It is also possible to 'fix' the date and use DATEVALUE("dd/MM/yyyy") instead of NOW, e.g. DATEDIFF(DATEVALUE("01/10/2015"), [Date], "days") .
Second step is to create irregular time intervals, that will 'bucket' the records and be used for sum calculation.

IF(
[Difference days]<1,"matured",
[Difference days]<2,"1 day",
[Difference days]<8,"1 week",
[Difference days]=<31,"1 month",
[Difference days]<92,"3 months",
[Difference days]<184,"6 months",
[Difference days]<366,"1 year",
[Difference days]<1096,"3 years",
[Difference days]<1827,"5 years",
[Difference days]<2557,"7 years",
[Difference days]=<3653,"10 years",
[Difference days]>3653,"over 10 years",
null)  

Aggregation and summing of investment amounts for each period is done in the Bar/Line view.]]>
Formulae: Identify date/time in the next 60 minutes http://forums.visokio.com/discussion/2764/formulae-identify-datetime-in-the-next-60-minutes Mon, 24 Nov 2014 04:15:48 -0500 nash 2764@/discussions
Date Result
15.05.2014 15:05:55 no
15.05.2014 17:10:55 yes
15.05.2014 17:20:55 no

I tried a similar logic as for moving average, but it didn’t work. I am not sure why. Maybe the date/time format works differently. ]]>
Formulae: Convert a time field (hh:mm) to an integer? http://forums.visokio.com/discussion/1635/formulae-convert-a-time-field-hhmm-to-an-integers Mon, 02 Jul 2012 21:44:30 -0400 JamesDutton 1635@/discussions