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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 3 replies
  • 1445 views
  • 0 likes
  • 3 in conversation