Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
What is wrong with the code.. I have two dates and I need positive non decimal days between the two dates..
Days between two dates =fabs(date(date#([Date Claim Finalised],'yyyymmdd'),'dd/mm/yyyy') )- fabs(date(date#([Date Claim Notified],'yyyymmdd'),'dd/mm/yyyy'))
Days between two dates =fabs(num(date#([Date Claim Finalised],'yyyymmdd')))- fabs(num(date#([Date Claim Notified],'yyyymmdd')))
Days between two dates =num(date#([Date Claim Finalised],'yyyymmdd'))- num(date#([Date Claim Notified],'yyyymmdd'))
When setting the format for dates I always use UPPER case. The reason is M/m.
M=Month
m=minute
(For the date comparisons with the same month value between the two comparing dates the value is correct, but for the rest you will have a decimal value equal to the month number difference, but in seconds.)
You can also simplify your expression a bit. Try this:
=date#([Date Claim Finalised],'YYYYMMDD')- date#([Date Claim Notified],'YYYYMMDD')
When setting the format for dates I always use UPPER case. The reason is M/m.
M=Month
m=minute
(For the date comparisons with the same month value between the two comparing dates the value is correct, but for the rest you will have a decimal value equal to the month number difference, but in seconds.)
You can also simplify your expression a bit. Try this:
=date#([Date Claim Finalised],'YYYYMMDD')- date#([Date Claim Notified],'YYYYMMDD')