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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 833 views
  • 0 likes
  • 2 in conversation