Reliability and integrity issues
It is important to comply with this rule: never rely on implicit conversions, and never treat Date
and Time
values as character strings by applying the SUBSTR
function. By changing the session format, the provided input value does not need to fit the mapping. Imagine a system migration to another server or the cloud. The original formats and assumed parameter values would not be retained. It can result in obtaining an improper value (such as changing the value of month
and day
, if applicable) or even raising an exception. Thus, it would be necessary to revise and rebuild the whole application! Avoid this situation before it occurs! It is enormously time- and money-consuming and requires the involvement of many developers. In addition, after the process, the whole system must be retested.
Thus, extraction using a substring is insufficient. If the session date format is changed, the extracted value does not need to be relevant. The developer cannot...