BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Nehcour0420
Calcite | Level 5

Hi ,

I redeveloping some ETL job from DB2 to SAS and having a problem. The previous work used MIDNIGHT_SECONDS (Returns an integer value in the range 0 to 86 400, representing the number of seconds between midnight and the time value specified in the argument.) clause which only could be used in DB2 and I am wondering if there is any way the achieve the same function in SAS using proc sql.

eg.

INT(MIDNIGHT_SECONDS(process_time)/900) AS timeslice

Thanks,

Eric

1 ACCEPTED SOLUTION

Accepted Solutions
data_null__
Jade | Level 19

SAS time values are "MIDNIGHT SECONDS".  You can read 'hh:mm:ss' fields with a TIME informat as SAS will store the value as SAS/TIME.

View solution in original post

1 REPLY 1
data_null__
Jade | Level 19

SAS time values are "MIDNIGHT SECONDS".  You can read 'hh:mm:ss' fields with a TIME informat as SAS will store the value as SAS/TIME.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

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