DATA Step, Macro, Functions and more


Occasional Learner
Posts: 1


Hi all,

please help

I am getting the following error

ERROR: Expression using IN has components that are of different data types.


Database Sample:

ID               BeginDT                                        Loc        Amount

1                 12Feb2016: 08:30:00.000000       NY          $20

2                 19Mar2016: 08:30:00.000000       NY          $40

6                 28Mar2016: 08:30:00.000000       NJ           $40

15               05Jan2016: 08:30:00.000000       NY           $60

11                11Dec2015: 08:30:00.000000       NC          $40


*** I want to use BEGINDT as my FILTER

*** BeginDT is DATETIME25.6 format and numeric


PLease help me thank you all


Super User
Posts: 23,754

Re: Timestamp

What does you code look like?

If filtering on BeginDT then you need to make the list match, so convert it to datetime variable as well, or convert BeginDT to a date using the DATEPART() function.
Super User
Posts: 5,882

Re: Timestamp

Perhaps you didn't specify the dt literal?

Like @Reeza said, you need to share your code so that we can see what's going on/wrong...

Data never sleeps
Valued Guide
Posts: 864

Re: Timestamp

data want;
set have;
where datepart(begindt) > '12dec2015'd;

Ask a Question
Discussion stats
  • 3 replies
  • 4 in conversation