I need function or code to take two fields one is the Century the other is the rest of the date. Example: RCRCCC = 20 RCRCDT = 100610

What I am try to do is create a view that takes the two fields puts them together into another field that is date format (2010-06-10 00:00:00.000)

Here it is in SQL:
CASE WHEN len(PODET.PDLRDT) = 6 THEN CAST(CAST(PODET.PDLRCC AS varchar(10)) + CAST(PODET.PDLRDT AS varchar(10)) AS datetime)
WHEN PODET.PDLRCC = 0 OR PODET.PDLRDT = 0 THEN NULL
WHEN PODET.PDLRCC = 20 AND len(PODET.PDLRDT) = 4 THEN CAST(CAST(PODET.PDLRCC AS varchar(10)) + '00' + CAST(PODET.PDLRDT AS varchar(10)) AS datetime)
WHEN PODET.PDLRCC = 20 AND len(PODET.PDLRDT) = 3 THEN CAST(CAST(PODET.PDLRCC AS varchar(10)) + '000' + CAST(PODET.PDLRDT AS varchar(10)) AS datetime)
WHEN PODET.PDLRCC = 19 THEN CAST(CAST(PODET.PDLRCC AS varchar(10)) + CAST(PODET.PDLRDT AS varchar(10)) AS datetime)
WHEN PODET.PDLRCC = 20 THEN CAST(CAST(PODET.PDLRCC AS varchar(10)) + '0' + CAST(PODET.PDLRDT AS varchar(10)) AS datetime) ELSE NULL
END as NEW_DATE_FIELD


HERE IS TABLE/View Fields
RCRCDT, RCRCCC,
PODET.PDITNO,
POHED.PHPONO,
PODET.PDWHID,
PODET.PDQRCD,
PODET.PDUNMS,
PODET.PDPDS1,
PODET.PDPDS2,
PODET.PDVNNO