Forum Discussion
Using DATEADD with full date table - 1900 to 9999
Hi all
I am trying to use DATEADD with my Date table, but my Date table runs from 01/01/1900 to 31/12/1999
So I think if I try DATEADD('Date'[Date], -1, YEAR), for example, it returns "An invalid numeric representation of a date value was encountered" because if you take one year away from 1900 you get 1899? Which isn't valid?
I feel like MAX and MIN may come into play.
Could be something else but I'm trying everything at this point!
Thanks!
3 Replies
- AnonymousNot applicable
Update - I created a VAR that was EDATE([MeasureForMaxDate], -12)
That returns 31/01/9998
However, if I add 12 months instead, it throws a 'result is too large or too small' error.
BUT if I do the same with the MIN date, it returns 01/01/1899 - which I thought should throw the same error but I guess it's still a 4 digit year? - amitchandak
Super User
Anonymous , Try like
Date(year('Date'[Date])-1, month('Date'[Date]), day('Date'[Date]))
- AnonymousNot applicable
Sorry Amit but this does not answer my question 😞