2

I have this data in a SAS table: 01Sep2016:21:31:27

I want to do this:

PROC SQL;
UPDATE lib1.tablename1
set Valid_From = '2000-01-01 00:00:00'dt
WHERE Valid_From = '1Sep2016:21:31:26'dt;
QUIT;

But the WHERE clause doesn't match. What is the correct format for the datetime value?

Dirk Sachse
  • 57
  • 3
  • 12
  • I assume the difference in milliseconds between your stated value and the value in the code (27 vs 26) is a typo! – Longfish Sep 02 '16 at 07:46

1 Answers1

4

You were very nearly there - try this:

PROC SQL;
UPDATE lib1.tablename1
set Valid_From = '01jan2000:00:00:00'dt
WHERE Valid_From = '01Sep2016:21:31:26'dt;
QUIT;
user667489
  • 9,501
  • 2
  • 24
  • 35