Jarom
Jarom

Reputation: 1077

How to update SAS table with specific date format

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

Upvotes: 0

Views: 1609

Answers (1)

Tom
Tom

Reputation: 51566

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;

Upvotes: 3

Related Questions