SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Achieve the MIDNIGHT_SECONDS clause of DB2 in SAS proc sql

Accepted Solution Solved
Reply
Contributor
Posts: 25
Accepted Solution

Achieve the MIDNIGHT_SECONDS clause of DB2 in SAS proc sql

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


Accepted Solutions
Solution
‎07-30-2012 03:35 PM
Respected Advisor
Posts: 3,799

Re: Achieve the MIDNIGHT_SECONDS clause of DB2 in SAS proc sql

Posted in reply to Nehcour0420

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


All Replies
Solution
‎07-30-2012 03:35 PM
Respected Advisor
Posts: 3,799

Re: Achieve the MIDNIGHT_SECONDS clause of DB2 in SAS proc sql

Posted in reply to Nehcour0420

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.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

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