0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

SAS Tips

Last updated at Posted at 2024-02-07

SASに関する個人的Tips
個人の備忘録です。
誤りの指摘、アドバイス等歓迎します。

SAS日付値の指定

様々な書き方

以下は同じ日付2024/01/01を表す。

input("01JAN2024", date9.)
input("20240101", yymmdd10.)
"01JAN2024"d
mdy(1,01,2024)

YYYYMMDDTHHMMSSの形の変換

ISO8601形式の日時値の変換は

input(2024-01-01T00:00:00, e8601dt.)

00:00:00を代入する方法

dhms( input( 2024-01-01T12:34:56, e8601da. ) ,0,0,0) ;

Excelの日付値を読んでしまった場合の対応

sasdate = XlsWinDate + 21915;

データセットを縦結合するとき、文字切れさせない方法

proc sql;
   create table datax as
   select * from data1
      union
   select * from data2;
quit;

参考にさせていただいたページ

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?