That case statement determines how many days are in the given month (the month specified in pVal). So "4:30" indicates that there are 30 days in the month of April. This, combined with the "<=" operator located just before the case statement, is used to evaluate if the day of the month is valid within pVal. If it is not valid, the error "Invalid date value ..." is thrown. Because this is checking the day of the month, the case statement is found in both DT (date value) and DTM (date/time value). 

All data structure formatting definitions can be found in the ValidateElementaryDT method of the EnsLib.HL7.Util.Validator class. Here you will see a case statement containing all of the possible data types and their respective formatting.  The "?" syntax in ObjectScript performs pattern matching, and, in this case, works to ensure that the value in the field is of the correct format. Otherwise, an error is thrown and the message does not pass validation. 

Hello Scott,

You can change the validation type in your Business Process to account for this. If you include 'y' as a validation type (in the Basic Settings tab of the Business Process), you can enforce data types, which will prevent you from sending a time stamp with missing or additional digits. You can then send these invalid messages to a Bad Message Handler and view the errors in the Event Log.