由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - 问个sas日期小白问题
相关主题
受不了EXCEL了(包子请教 proc report ods excel file)SAS 数据读入的问题 (proc import)
Import excel file to sas (the first 8 or more observationssas question
sas help!!Easy SAS question, anyone can help
SAS format 的问题问题又来了。SAS读excel的问题。
SAS 编程问题 (有包子)有关IMPORT EXCEL FILE 的问题
[合集] 抛砖引玉,从statistician的角度来谈谈sas programmer[合集] 面试求教 Proc Import from Excel options
How to import several excel files together?请教如何同时用sas打开多个excel文件?多谢!
请问sas里,怎么在PROC IMPORT的时候指定变量的格式Proc import 读excel文件,怎么略去前面几行?
相关话题的讨论汇总
话题: excel话题: import话题: sas话题: date话题: proc
进入Statistics版参与讨论
1 (共1页)
j*****i
发帖数: 69
1
从excel import到sas里以后再
proc print;format date mmddyy10.;
发觉所有日期都少了40年少一天怎么回事
l******n
发帖数: 9344
2
穿越了?

【在 j*****i 的大作中提到】
: 从excel import到sas里以后再
: proc print;format date mmddyy10.;
: 发觉所有日期都少了40年少一天怎么回事
: 汗

m*********n
发帖数: 413
3
excel and sas code time/date as a numerical value
保险的做法是,把excel的时间保存为string
然后读入到时候也用string的格式读入,再用sas的时间format或者函数去转换
我记得cdisc里面的时间都是这么弄的

【在 j*****i 的大作中提到】
: 从excel import到sas里以后再
: proc print;format date mmddyy10.;
: 发觉所有日期都少了40年少一天怎么回事
: 汗

w*******n
发帖数: 469
4
sas start date 01/01/1960, excel start date 01/01/1900
P****n
发帖数: 196
5
good point, add an offset before converting.

【在 w*******n 的大作中提到】
: sas start date 01/01/1960, excel start date 01/01/1900
j*****i
发帖数: 69
6
正解!谢谢!
后来发觉原先excel里的date是numeric
改成date格式再import就好了
还有excel好像对格式有记忆,有时要重新insert column把数据拷过去。
可以再问个如何把excel里多个sheet同时import的问题么?
用wizard好像得一个一个sheet import
必须得写个macro循环proc import?
proc import有没有一个option?

【在 w*******n 的大作中提到】
: sas start date 01/01/1960, excel start date 01/01/1900
1 (共1页)
进入Statistics版参与讨论
相关主题
Proc import 读excel文件,怎么略去前面几行?SAS 编程问题 (有包子)
proc report format question[合集] 抛砖引玉,从statistician的角度来谈谈sas programmer
SAS proc import excel file 紧急求助How to import several excel files together?
求方法把sasdata num.var真实值和对应format value 输出excel请问sas里,怎么在PROC IMPORT的时候指定变量的格式
受不了EXCEL了(包子请教 proc report ods excel file)SAS 数据读入的问题 (proc import)
Import excel file to sas (the first 8 or more observationssas question
sas help!!Easy SAS question, anyone can help
SAS format 的问题问题又来了。SAS读excel的问题。
相关话题的讨论汇总
话题: excel话题: import话题: sas话题: date话题: proc