cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
penalah
Level II

Selecting data for last year using date column

Hello,

 

I'm in the process of getting only previous year data(i.e., from Jan 2021 till Dec 2021) and am having trouble selecting the data I need.

I would like the script to select all dates from January 2021 to December 2021 and nothing else.

 

Thanks in advance.

1 REPLY 1
txnelson
Super User

Re: Selecting data for last year using date column

dt << select where(:date >= date mdy(01,01,2021) & :date <= datemdy(12,31,2021 ));

 

Jim