BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello,
If the file is so big, how to print all,
Thank you very much?


Message was edited by: GooDclassmate Message was edited by: GooDclassmate
2 REPLIES 2
deleted_user
Not applicable
> Hello,
> If the file is so big, how to print all,
> Thank you very much?
>
>
> Message was edited by: GooDclassmate
>
> Message was edited by: GooDclassmate

Is this some error message you got? In what application? What were you trying to do?

Generally I'd say that if a file is too big, printing it would be ill advised. What will you do with the printout? The paper waste is too horrible to contemplate.

Consider printing a sample of the records in the file so you can develop the code to process the whole file electronically and intelligently.

Kind regards

David
deleted_user
Not applicable
I believe the original question was:

----------------------------------------

Hello,
I am new hand in SAS and I met a trouble when I used the SAS to read the data.csv files, the "time" was not correctly read, for example, "5/31/2007 23:00" become as "5/31/2007". How could I read the "time" correctly?
Thank you very much!


Timexxxx Value
5/31/2007 23:00,1789
1/11/2007 0:10,2631
11/11/2007 0:20,1343
11/12/2007 10:20,2343

-------------------------------------------------

To answer this, one way would be the following

data metrics;
length datestring $16;
infile datafile dlm=',' ;
input datestring $ value;
date = input(scan(datestring,1," "), mmddyy10.);
time = input(scan(datestring,2," "), hhmm.);

hh = hour(time);
mm = minute(time);
datetimestamp = dhms(date,hh,mm,00);

drop hh mm;
run;
quit;

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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