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

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 496 views
  • 3 likes
  • 2 in conversation