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.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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