Forum Discussion
julesdude
Post Partisan
3 years agoDATEDIFF incorrect - not sure why
Hi all, I have the following matrix table in my report: The Unexpired Lease in Days column contains the following: Unexpired Lease in Days =
VAR _asofdate = [As Of Date]
VAR _leaseend...
tamerj1
Community Champion
3 years agoNot sure the reason for using the FORMAT function. However, please try
RETURN
_targetdate
Or
RETURN
DATEVALUE(FORMAT(_targetdate, "dd/mm/yyyy"))
julesdude
Post Partisan
3 years agoThanks tamerj1
It worked simply with replacing the FORMAT line as per your suggestion, and just use:
RETURN
_targetdate
It is really strange - I had put this in originally because I could not select the Format of the measure as a date at the time. but it now gives me the option to Format as a date now that I've removed the FORMAT line.
Anyway, many thanks for your help! The format change now provides the correct calculations: