BookmarkSubscribeRSS Feed
woo
Barite | Level 11 woo
Barite | Level 11

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

 

 

 
2 REPLIES 2
Reeza
Super User

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);

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 2 replies
  • 1068 views
  • 0 likes
  • 3 in conversation