问题
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');
来源:https://stackoverflow.com/questions/40944531/adding-month-and-date-values-to-an-attribute-containing-only-year-psql