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.

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 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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