Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: converting SAS file to stata using stat transfer-date and time variables

From   Anders Alexandersson <>
Subject   Re: st: RE: converting SAS file to stata using stat transfer-date and time variables
Date   Tue, 21 Dec 2010 11:17:36 -0500

Leny, what is weird? Nick (and others, including Bill Gould) gave you
a reasonable explanation to the problem and useful advice.
Stat/Transfer does not support conversions between any of the numeric
types, dates, or strings.
I guess this is why the conversion results surprised you.
You are using an old version of Stat/Transfer. Some people might think
that is weird.
If you need more help, please provide log files.

Anders Alexandersson

On Mon, Dec 20, 2010 at 3:40 PM, Leny Mathew <> wrote:
> Thanks Nick. It's weird considering that the conversion to excel works
> fine. I can convert it as a csv file and then get it into stata
> without any issue.
> On Fri, Dec 17, 2010 at 12:07 PM, Nick Cox <> wrote:
>> I wouldn't assume much in this territory. Dates and times seem simple in principle but can be very awkward in practice.
>> On this information, my only guess is that time (presumably time of day, up to 24hr) is being converted to fraction of a day. You need to look really closely at the data in SAS and in Stata.
>> Nick
>> Leny Mathew
>> I'm trying to convert a SAS file (V 9.1) with date and time variables
>> (separate) into stata and I'm using stat transfer (version 8) for
>> this. During the conversion, the date variable comes across fine, but
>> all the time variable values are between 0 and 1. stat transfer reads
>> the SAS file without any problem, it looks fine in the viewer and it
>> converts into excel without any problem. I didn't have to format the
>> date variable within stata, so I'm assuming that I don't have to do
>> any formatting for the time variable either. Has anyone had this issue
>> before?
>>  Any comments are much appreciated. I'm using stata 10.1

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index