Using Wildcard Characters With datetime Data

When you use like with datetime values, the SAP ASE server converts the dates to the standard datetime format, then to varchar. Since the standard storage format does not include seconds or milliseconds, you cannot search for seconds or milliseconds with like and a pattern.

It is a good idea to use like when you search for datetime values, since datetime entries may contain a variety of date parts. For example, if you insert the value β€œ9:20” and the current date into a column named arrival_time, the clause:
where arrival_time = '9:20'
would not find the value, because the SAP ASE server converts the entry into β€œJan 1 1900 9:20AM.” However, the following clause would find this value:
where arrival_time like '%9:20%'