0
votes

I have to update some dates in a table using SAS. The problem is that the format of the date column that I'm trying to update is not allowing me to make the changes I need.

The dates look like this 05NOV2013:00:00:00

The sql is very easy, I just don't know how to get SAS to accept what I'm trying to update. This is what I have:

proc sql;
update ods.test
set start_dt = 05NOV2013:00:00:00; /*of course this is the problem section*/
quit;

I've been looking at this article to try to find the format and I think the formate might be "DATEw." I'm no t really sure how to update the table even if I know the name of the format. http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000195834.htm

1

1 Answers

3
votes

If you want to update to a constant then just use a datetime literal.

proc sql;
update ods.test
  set start_dt = "05NOV2013:00:00:00"dt
;
quit;