【发布时间】:2021-09-10 20:15:13
【问题描述】:
我正在尝试在我的程序中进行时区转换,但遇到了一些困难。下面我有
data GMT_conv;
set table;
if city in ('Atlanta', 'Baltimore' , 'New York') then conv = -5;
if city in ('Minneapolis') then conv = -6;
if city in ('Salt Lake City') then conv = -7;
if city in ('San Francisco') then conv = -8;
run;
但是,这仅适用于非夏季月份。夏令时更改了 3 月的第二个星期日和 Novmember 的第一个星期日。我想不出一种方法来执行此 if 语句(在 SAS 或 proc sql 中)
我想要什么:
if (between 2nd sunday in march and 1 sunday of november)
then conv +1;
有什么建议吗?
【问题讨论】: