We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Cant Select Date Before 1970

mostafaashr
Giga Contributor

The Service Portal Date picker throws a false validation error for birthdates before 1970 due to a bug in parsing negative epoch time with the dd/MM/yyyy format. While browser/native engines blindly auto-correct modern dates after 1970, they completely fail to guess or parse older dates, triggering a false "Invalid Date Format" error.

3 REPLIES 3

DrewW
Mega Sage

I think you may need to check to see if you have any validation scripts or client scripts added for your instance because we have a date var on every cat item we have and it will happily take 19/07/1919.

 

Tanushree Maiti
Tera Patron

Hi @mostafaashr 

 

Refer this KB: KB0782953 Valid_to date is set improperly when the date format for the system is changed to - dd-MMM... 

 

Workaround

Do not use date formats that include only two digits for the year (eg. dd-MM-yy, dd-MMM-yy). Use a date format that uses 4 digits for the year (eg.YYYY-MM-dd,  MM-dd-YYYY).

Please note this is not a platform issue, two-digit year format shouldn't be used for representing a year. Please see the docs for more details:

https://docs.servicenow.com/csh?topicname=t_PersonalizeTheSystemDateFormat.html&version=latest

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

Thanks for the response, but this KB is irrelevant to my issue. I am not using a two-digit year format. My system date format is already configured using 4 digits (dd/MM/yyyy).

The issue specifically happens with the Service Portal date picker failing to parse dates before the year 1970 (negative epoch time) on this 4-digit format. Modern dates after 1970 work completely fine