Hey,
I am trying to count the number of days between two dates. The dates are associated with an insurance policy. One date is for the day the insurance policy began and the other date is for the day the insurance policy was renewed.
What I want to know is the diference in days of the date in the month the policy was renewed and forget about the year.
For example: First Date - 12092005 (stands for 12/09/2005) Second Date - 15092006 (stands for 15/09/2006)
So what I want is the difference between 12/09 and 15/09. So the answer would be three days.
I used the left function to get rid of the year bit from the date. So the dates would be '1209' and '1509'
Anybody have any ideas? I tried the following query:
The answer it gives is -300
I am trying to count the number of days between two dates. The dates are associated with an insurance policy. One date is for the day the insurance policy began and the other date is for the day the insurance policy was renewed.
What I want to know is the diference in days of the date in the month the policy was renewed and forget about the year.
For example: First Date - 12092005 (stands for 12/09/2005) Second Date - 15092006 (stands for 15/09/2006)
So what I want is the difference between 12/09 and 15/09. So the answer would be three days.
I used the left function to get rid of the year bit from the date. So the dates would be '1209' and '1509'
Anybody have any ideas? I tried the following query:
Code:
Expr3: DateDiff('d',[Expr1],[Expr2])
The answer it gives is -300
Last edited: