Calculating days between two dates

Hey there,

I've a scenario where the enumerators enter a Nepali date and by
calculating the date-difference with today(), number of days are
achieved. To perform this, I created an excel (uploaded as media file to
the survey form) reference that has the mappings of all relevant Nepali
dates with the English dates.

I created a survey form that fetches the equivalent English date from an
entered Nepali date from the reference excel file fine
. How can the day
differences between those two dates be calculated? I've attached the xls
form and the reference excel (date_key column in the media file is the
input entered in the survey form and datevalue is the respective English
date). I've given few tries here and there doing researches but none seems
to be working. Any lead is much appreciated.

survey_form.xls (29.5 KB)

datedata_test.csv (109 Bytes)