BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
BETO
Fluorite | Level 6

I      Have two tables that I need to merge 

 

 

data all;

Merge table1  table2;

by machine;

incomplete merge comes in only 3   Of 1k...

tablet1  time   Column is format as number...I     Need.  To convert to time8

data    Table2;

set table2;

format ttime time8.;

run;

 

the col comes back blank

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
1. Figure out what it is, run a proc contents to see the variable type and format.
2. If it's a character, use input with the format to read it in as a different format (input(var, time8))

View solution in original post

3 REPLIES 3
Reeza
Super User
Please clarify your question.
BETO
Fluorite | Level 6

How do I change the format on  my time col to time ? I currently have it as a number in the description section     The data looks like this 12:23:45 ... When I use the data step to change the format it comes back blank the col I wonder if it's even a number maybe it's a character?  How do I convert character to number with a time8 format ? 

Reeza
Super User
1. Figure out what it is, run a proc contents to see the variable type and format.
2. If it's a character, use input with the format to read it in as a different format (input(var, time8))

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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