1

In Informatica I use the below expression:

IIF( PARAMETER_NAME='$$CURRENT_DATE_IN_SQL_FORMAT',TO_CHAR(SYSDATE,'YYYY-MM-DD'),'PARAMETER_VALUE')

which give me the date in format 2021-11-25

But I need it me to return value as below format

TO_DATE('2021-11-25', 'YYYY-MM-DD')

Any help is much appreciated Thanks

Talha Tayyab
  • 8,111
  • 25
  • 27
  • 44
Partha
  • 11
  • 1

1 Answers1

1

You can use below expression.

IIF( PARAMETER_NAME='$$CURRENT_DATE_IN_SQL_FORMAT',
'TO_DATE('|| CHR(39)||
TO_CHAR(SYSDATE,'YYYY-MM-DD')||chr(39)||','||chr(39)||'YYYY-MM-DD'||chr(39)||')',
,'PARAMETER_VALUE')

You can calculate your expected output by concatenating quote, and ||.

Koushik Roy
  • 6,868
  • 2
  • 12
  • 33