Hello,

Could someone kindly help me rewrite the correct syntax to write in order to use a date and text field in a case statement. However I need to find the maximum date of the date field, so am assuming that I need to to use both to_char and to_date

case when location = 'DOSPR' then Max(TO_CHAR(TO_DATE(datetime,'YY/MM/DD'),' YY/MM/DD')) else '' end as test,

Can anyone help?

Thanks
Helen