How to pass the date to a search dynamically based on the system date format changes

Scenario

How to pass the date to a search dynamically based on the system date format changes?
(When the user changes the system date format using Set Preference)

Solution

CASE WHEN (TO_CHAR(TO_DATE({linesystemnotes.date}), ‘MM-DD-YYYY’)) > (TO_CHAR(TO_DATE(’03-01-2023′,’MM-DD-YYYY’), ‘MM-DD-YYYY’)) THEN 1 ELSE 0 END

Leave a comment

Your email address will not be published. Required fields are marked *