Adding month and date values to an attribute conta

2019-09-15 01:09发布

问题:

Right now I have dates that look like this format(datecreated from table2)

 +1999
 +1999
 -0700
 -0480

And I want them to look like (inserted into creationdate in table)

1999/12/31
1999/12/31
-700/12/31
-480/12/31

This is my best attempt so far (the numid and accnum are just to find where the records match)

update table set creationdate = to_date('1231'||(to_char((select datecreated from table2 m, table n where m.accnum = n.numid), 'sg9999')),'MMDDSGYYYY');