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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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