in a date field, that calculates the expiration date, i have sometimes some items that never expires.
Then what to place in this date field, if never will expire?
Depends on definition of "never".
Case( Expires = "No"; date(12;31;3018)) //a distant date
December 31, 4000 is the max/limit for a date field
If December 31, 4000 isn't long enough in the future, you could use a text field and Java's "MAX_DATE":
Sunday, August 17, 292,278,994
But seriously, I would just use business logic that understands that some items never expire.
Perhaps add a field like "expires" (T/F), for example.
If an item does not expire, then I would expect its expiration date to be empty. But then the question is how exactly are you going to use this field. If it is used to sort all items by their expiration date, then the suggested Date ( 12 ; 31 ; 4000 ) might be a better choice.
Retrieving data ...