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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 699 views
  • 0 likes
  • 2 in conversation