I have one numeric value (below) as time and description of the value is "in seconds since the epoch".
would I able to convert it into hh:mm:ss? - Thanks.
1510949673
Sounds like that’s a date time. Do you know what the date of 'epoch' is?
Try to apply the datetime format. If it shows a date and time you expect you can use TIMEPART to extract the relevant time portion.
Proc print data =have;
Format variable datetime.;
Time_portion = timepart(variable);
This might be a UNIX timestamp, in which case you need to add the difference between 01jan1960 and 01jan1970 to correctly display in SAS.
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.
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.