BookmarkSubscribeRSS Feed
floflow
Calcite | Level 5

Hi,

 

I want to transform my hours that are currently in 12hour clock, with am pm to 24 hours clock

 

Thanks for your help! 

1 REPLY 1
PaigeMiller
Diamond | Level 26

First, you need to let us know if these are numeric variables (according to PROC CONTENTS) or character variables.

 

If numeric, probably the format TIMEAMPM. is assigned to this variable. All you need to do is assign the TIME. format to this variable.

 

In a data step, or PROC, use

 

format yourvariablename time.;
--
Paige Miller

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1 reply
  • 418 views
  • 3 likes
  • 2 in conversation