Converting code to date??

I am importing data with a Dataport into a journal. It is a code that have been in use for some time I import a date field into a code field. This new field should now be used in “Gen. Journal”.“Posting Date” … but ofc u get a text to date error. (Typical converting error) so how do u convert a code field to a date field? I have tried som FORMAT commands, but with no luck… any proposals?

Use EVALUATE and DMY2DATE functions. /Soren