BookmarkSubscribeRSS Feed
gnrslasher37
Fluorite | Level 6

I have time data in format of hh:mm:ss:nnn. How can i read the data with interval of a minute from that data where nano seconds are inclusive.

 

Thanks,

 

Gobin

4 REPLIES 4
Kurt_Bremser
Super User

Use the INTNX function to increment by 'minute'. Edit: with alignment 'same'!

If your value is still stored in a character variable, use the time12.3 informat for conversion before applying the intnx function.

gnrslasher37
Fluorite | Level 6
Thanks for the previous one. Further, is it possible to get the millisecond
value from hh:mm:ss.nnn time format in SAS. Actually i have the data that
differs on that milliseconds.

##- Please type your reply above this line. Simple formatting, no
attachments. -##
Kurt_Bremser
Super User

If you used the time12.3 as informat, your SAS time value will contain the milliseconds after the decimal point.

To extract only the milliseconds, do

milsecs = (timeval - int(timeval)) * 1000;
Sousa
Calcite | Level 5

@Kurt_Bremser Thank you very much!! This helped. Smiley Very Happy the key 'same'

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 2894 views
  • 2 likes
  • 3 in conversation