Hi everyone, I'm working on a project where I'm capturing a GS1-style string, in which one of the substrings corresponds to the date. In my case, when converting it to a date format using the str2date method, I've noticed something strange:
If the string is in the format “991231”, the method returns it as 31/12/1999.
If it is “421231”, it returns 31/12/1942.
If it is “411231”, it returns 31/12/2041.
I would like to know why this is happening and if there is any way to make the string “991231” be interpreted as 12/31/2099, since I use that date for items that do not have an expiration date as such.
Thanks!