Problem with 12/31/9999 in UD Entry Customization

I am using UD05 to contain information extracted from Avalara Cert Capture and display it on the Customer Entry screen. Avalara uses the date 12/31/9999 in a date field to indicate that a certificate never expires. I can use DMT to successfully import 12/31/9999 into UD05. I can use a BAQ to correctly display the value 12/31/9999. But when the same date field is attempted to be displayed in an epiDatetimeEditor in UD05 Entry Program, there is an error and the field shows blank:

Message: Date Time Notification Exception: UD05.Date02(12/31/9999), source data value is invalid
Inner Exception
Message: The control’s value cannot be set outside the range determined by the ‘MinValue’ and ‘MaxValue’ properties.

I can enter and save a value of 12/31/9998 in that field, but not any dates in 9999.

Is there any way to change the MaxValue of that epiDateTimeEditor?
If I change that field display to a TextBox, it displays like this:


Is there a way to change the format to just show the date, not the time?

Another approach is to intercept the text extracted from Avalara and substitute 12/31/9998 for 12/31/9999 before Epicor even knows about it. (I don’t think that one year will make a difference in 9998!)
Is there any other approach I should consider?

I think the date min/max are a limitation of SQL. We had the same issue when someone entered the year as 0069 by mistake and all our SSRS reports errored out since that date is outside the range.

1 Like

Ahh… I hadn’t noticed this before
Per quick Google search …

SQL, DMT and BAQ all do not complain at all about 12/31/9999. It’s only the epiDateTimeEditor in a customization that is a showstopper for 12/31/9999. If I understand the stackoverflow link about WinForms and DateTimePicker, it’s baked into code, and I guess epiDateTimeEditor is somehow derived from that same code, so no chance for me to change it.
My workaround is to replace the 12/31/9999 dates with 12/31/9998 just before importing the data from Cert Capture to Epicor with DMT (all in a Powershell script, so no extra steps for me each day).
Thanks for the inputs.