When trying to define a variable with
define test_date=to_date('31.12.2024','dd.mm.yyyy');
I get the error
An error occurred while running the statement. An unexpected error with the following message occurred: Unexpected token: ( at offset: 24 expected one of: [WHITESPACE, EQUALS]. Retry the request, if the issue persists, report it to product support.
As a workaround I can rewrite as the following.
define test_date='31.12.2024';
select to_date('&test_date','dd.mm.yyyy') from dual;