BookmarkSubscribeRSS Feed
EinarRoed
Pyrite | Level 9

I have opened the following table in DI Studio:

Skjermbilde.PNG

I open the filter and build the following expression:

VALID_FROM_DTTM = "25APR2012:22:58:23"dt

Yet, no rows are returned.

What am I doing wrong? Smiley Happy

3 REPLIES 3
LinusH
Tourmaline | Level 20

Is this a Base SAS table?

Maybe you have microseconds. Apply datetime22.3 format to see any decimals.

Try to this programmatically as well, outside DIS. Both viewing and filtering.

Data never sleeps
TomKari
Onyx | Level 15

The constant in your expression is an integer, as it represents a number of seconds. However, it is possible for a datetime value to have decimals, representing parts of seconds, which wouldn't show up in your formatted display.

Try FLOOR(VALID_FROM_DTTM) on the left side of the expression.

Tom

EinarRoed
Pyrite | Level 9

You're both correct. When using the datetime22.3 format the values appear as "25APR2012:22:58:23.365", and I can use FLOOR on the left side to select them regardless of the decimals. Thank you very much. Smiley Happy

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1311 views
  • 8 likes
  • 3 in conversation