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-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 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
  • 1046 views
  • 8 likes
  • 3 in conversation