Date( function behavior

datepattern(date(“12/31/28”),“dd Month yyyy”) ==> 31 December 2028
but
datepattern(date(“1/1/29”),“dd Month yyyy”) ==> 1 January 1928.

What is the rule in handling future dates with the date( function?

I hope we are not losing at another Y2K problem (just kidding).

See the help page for Dates, specifically:

Panorama will assume the date is in the past unless it would be within the next five years.

(I find that

datepattern(date(“1/1/29”),“dd Month yyyy”)

returns

1 January 1929

which agrees with the above.)

Thanks Peter. I have been misreading your user name as pcnewbie. But I keep thinking this guy knows an awful lot for a newbie. Now I see my mistake.

Note that this only occurred because you left off the century. Further down on the help page it says:

If you want to specify a date more than five years in the future, simply be sure to fill in the entire century rather than just the last two digits of the year, for example 7/2/2024 .

I guess I should probably change that to something like 7/2/2097 so that it will be a correct example for a long time.

By the way, this default century behavior is a bit different than it used to be. It used to default to the nearest 50 years. But I changed it because I think dates in the past are much more commonly used than dates in the future.