I want to be able to calculate the difference between a start date and end date in a datafeed.
The columns are both date format dd/MM/yyyy (no times, dates only)
I looked at the arithmetic calculation but that would not take dates only numeric columns
In my datafeed I have the start and end date on a single row and I want to see the difference in terms of number of days.
I also want to calculate the average difference on a number of rows where the difference calculation per row could vary
This obviously needs to accommodate the normal calendar including leap year
Example of the calculation I am seeking to re-create in MashZone using February to demonstrate leap year - is:
| 28/02/2011 | 02/03/2011 | 2 days difference |
| 29/02/2012 | 01/03/2012 | 1 day difference |
| 29/02/2012 | 29/02/2012 | 0 day difference |
The example is in European date format dd/mm/yyyy
I hope someone can help me
Thanking you in anticipation
Charles
Stephan Freudl on
Hi,
to do some math based on dates you need to convert their column type to number first. It has been asked and described recently.
Once a date has been converted into number it represents the number of milliseconds since 1970. So all the leap year stuff remains transparent.
Regards
Stephan