SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Selecting a DATETIME20 value using a filter in DI Studio

Reply
Frequent Contributor
Posts: 89

Selecting a DATETIME20 value using a filter in DI Studio

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

Super User
Posts: 5,259

Re: Selecting a DATETIME20 value using a filter in DI Studio

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
PROC Star
Posts: 1,095

Re: Selecting a DATETIME20 value using a filter in DI Studio

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

Frequent Contributor
Posts: 89

Re: Selecting a DATETIME20 value using a filter in DI Studio

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

Ask a Question
Discussion stats
  • 3 replies
  • 286 views
  • 8 likes
  • 3 in conversation