BookmarkSubscribeRSS Feed
Gpp
Fluorite | Level 6 Gpp
Fluorite | Level 6
Hi , I receive a excel file with this simple date format , anyone can help to get the correct date time format to import in SAS ? yyyy-MM-ddTHH-hh-ss-SSSZ

Thanks
3 REPLIES 3
Gpp
Fluorite | Level 6 Gpp
Fluorite | Level 6
Sorry , , pls look at this correct one .
yyyy-MM-ddTHH:mm:ss.SSSZ
RW9
Diamond | Level 26 RW9
Diamond | Level 26
ballardw
Super User

@Gpp wrote:
Hi , I receive a excel file with this simple date format , anyone can help to get the correct date time format to import in SAS ? yyyy-MM-ddTHH-hh-ss-SSSZ

Thanks

You may want to save the Excel file to CSV format so that you can specify an INFORMAT in a data step to read specific values. Otherwise you will need an additional step after importing.

 

And if you are going to deal with multiple files in same layout Proc Import makes fresh guesses for each file you read which may lead to variables changing data type and/or lengths from file to file causing issues if the data sets are combined. CSV and a standard data step to read the files can prevent many headaches later.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 975 views
  • 0 likes
  • 3 in conversation