Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下のような形式の日付があり、Rを使用して文字列から日付に変換します
date <- "20 Nov 2010 21:44:00:000" strptime(date,"%d %b %Y %H:%M:%S")
Stataでやりたいのですが、どうやって?私はStataでこれを試しました:
gen time_2 = date(time,"DMYhms#")
しかし、それは大丈夫ではありません、それはなぜですか?ありがとう。
このdate関数は、日、月、年で表された日付を変換します。時間と秒を含むタイムスタンプの場合、clock関数が必要です。新しい変数は倍精度である必要があります
date
clock
gen double time_2 = clock(time,"DMYhms#")