Please consider this SQL on Oracle 12c
select to_date('01-02-2020','MM-DD-YYYY'),
standard_hash (to_date('01-02-2020','MM-DD-YYYY'), 'MD5') Only_Date_MD5,
to_date('01-02-2020 12:34:56','MM-DD-YYYY HH:MI:SS'),
standard_hash (to_date('01-02-2020 12:34:56','MM-DD-YYYY HH:MI:SS'), 'MD5') DateTime_MD5,
standard_hash (to_date('01-02-2020','MM-DD-YYYY') || 'SomeText', 'MD5') Date_Concat_Text_MD5,
standard_hash (to_date('01-02-2020 12:34:56','MM-DD-YYYY HH:MI:SS') || 'SomeText', 'MD5') DateTime_Concat_Text_MD5
from dual;
Output
SOME_DATE 01/02/2020
ONLY_SOME_DATE_MD5 6D44D021F4D2CACA3DBEC6E88AEEB7AD
SOME_DATETIME 01/02/2020 12:34:56
SOME_DATETIME_MD5 F8FDBBC5181E79B99A1EE13CB71A1D46
DATE_CONCAT_TEXT_MD5 **FE7DA8E96A7233A33F03CC592A929011**
DATETIME_CONCAT_TEXT_MD5 **FE7DA8E96A7233A33F03CC592A929011**
Why is Oracle MD5 returning same value for a Date concatenated with text and DateTime(with same Date) concatenated with same text. It is discarding the time portion of DateTime while deriving the MD5.