简体   繁体   English

如何在SAS中的两个日期之间提取/获取数据?

[英]How can I extract/get data between two dates in SAS?

Can anyone help to find a way to extract all data between two dates (for example 01/10/2007 and 31/03/2008) in SAS please? 有人可以帮忙找到一种方法来提取SAS中两个日期(例如01/10/2007和31/03/2008)之间的所有数据吗? Date format is DDMMYY10. 日期格式为DDMMYY10。 I tried the syntax below: 我尝试了以下语法:

Data want; set have; where OrderDate between 01/10/2007 and 31/03/2008; Run;

it was giving me an error. 这给了我一个错误。 Thanks 谢谢

data want;
set have;
where orderDate between '01OCT2007'd and '31MAR2008'd;
run;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM