Calculate the difference between 2 dates

araza123

New member
Local time
Today, 11:54
Joined
Apr 6, 2022
Messages
24
Hi all,

I am trying to simply find the difference between 2 dates in my querey. I want the result to be listed in days

i presently have it as
Difference: DateDiff('d',[Claim Entered Date]-[Sale Date Ky],Date())

but this is not yielding the correct results. Anyone know what I am doing wrong here? Thanks in advance

1650314592844.png
 
To get the difference between two dates, you can use either:

Date1 - Date2

or

DateDiff("d", Date1, Date2)
 
DateDiff calculates between two dates.
You are making one of them a stupid number by subtracting one from another.
 
Perhaps your expression should be:

Difference: DateDiff('d',[Claim Entered Date]-[Sale Date Ky])

PS, it is poor practice to use embedded spaces or special characters in your names. You should also avoid like the plague any function or property names, especially "Name" and "Date" since both of these will cause unexpected results in certain circumsatances.
 

Users who are viewing this thread

Back
Top Bottom