SAS Enterprise Guide

Desktop productivity for business analysts and programmers
BookmarkSubscribeRSS Feed
c4th1
Fluorite | Level 6

Hi,

I am running the following codes. Just wondering how do I change the dttm to come out as a proper date format?

 

PROC SQL;

CREATE TABLE WORK.QUERY_FOR_AUDIT_VISUALANALY_0000 AS

SELECT t1.timestamp_dttm,

 

t1.userid,

t1.object_type,

t1.executor_nm,

t1.newlasr_server_name,

t1.newlocation,

t1.newtable_name

FROM TMP00002.audit_visualanalytics t1

WHERE t1.timestamp_dttm > 31/12/2018;

QUIT;

 

 

regards

Cathy

1 REPLY 1
PGStats
Opal | Level 21

Use

 

datepart(t1.timestamp_dttm) as timestamp_dt,

 

and

 

WHERE calculated timestamp_dt > '31DEC2018'd

PG

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1390 views
  • 0 likes
  • 2 in conversation