BookmarkSubscribeRSS Feed
mdkryptoking
Calcite | Level 5
I am just starting to use PC SAS at work and we have linked it to our SQL server so i can see our tables there. My problem is that all of the date fields come over in the following format: 01MAR2009 00:00:00. I know that SQL stores it with the timestamp and programs like Microsoft Access and SQL Server software can some how strip it off and makes the date viewable as mm/dd/yyyy. I was wondering if there was a setting somewhere in PC SAS that can make date fields easier to use instead of me having to format it every damn time. Thank you.
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
I believe there are "import" options where SAS will scan the incoming standard "datetime" variables for a date and assign a SAS DATE formatted variable, rather than a datetime variable. Check the SAS DOC for handling datetime columns, options USEDATE= and SCANTIME=.

Scott Barry
SBBWorks, Inc.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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