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

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!

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
  • 582 views
  • 0 likes
  • 2 in conversation