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

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1111 views
  • 0 likes
  • 3 in conversation