BookmarkSubscribeRSS Feed
Siddharth_s
Calcite | Level 5

Hi all,

SAS VI (10.8) does not display the correct time format. I am using the database MS SQL Server and the value of the variable contains is 00:03:37 and the datatype of the variable is time(7). SAS VI (10.8) shows the date and time as January 1, 1970 12:08:58 am.

Ex -

ResTime
Jan 1, 1970 12:08:58 AM
2 REPLIES 2
fja
Lapis Lazuli | Level 10 fja
Lapis Lazuli | Level 10

And if you used time. as a format? E.g.

format TimeVar time.;

in the data step?

The date 1/1/1970 makes (sort of) sense, as you just have a time as input and the integer value of 0 is interpreted as 1/1/1970 0:00 on unix-like systems (i.e. the beginning of time).

 

SASKiwi
PROC Star

Since you are getting this result in a SAS product, not through your own SAS programs, I suggest opening a Tech Support track for this. It's obvious that SAS is treating the time column as a datetime.

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!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 383 views
  • 0 likes
  • 3 in conversation