I created this script to do date calculation between a date and today, but for some reason I get a decimal number.
How can I just get the number of date without decimal point ?
Tried to use a roundup formula but that's messy, what the best way to handle this?
set theDateWantedValue to "25/03/2019"
set [dayVal, MonthVal, YearVal] to the words of theDateWantedValue
set the text item delimiters to "/"
##set date_string to {d, ordinal, Y} as text
##set myotherDate to date_string
set dateDelaybetwentheDate to ((date (theDateWantedValue as string)) - (current date)) / days
set myResultDateRound to RoundDecimal(dateDelaybetwentheDate, 1, down)
on RoundDecimal(NumberToRound, DecimalPlace, UpDown)
set RoundFactor to 10 ^ DecimalPlace
NumberToRound * RoundFactor
round result rounding UpDown
result / RoundFactor
end RoundDecimal