Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Re: Cannot get date fields to import from PostgreSQL via ODBC


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: Re: Cannot get date fields to import from PostgreSQL via ODBC
Date   Tue, 27 Sep 2005 17:07:53 +0100

A tangential comment: 

For Stata, date variables are not a variable type, 
or a set of variable types. Dates are held as integer-valued 
numeric variables and the date part works through formats 
and functions. 

In Stata, naturally, you can also hold a date as a string, 
but its date attributes then lie in the eye of the beholder. 

Other programs have other attitudes, but the key point here, 
I believe, is that Stata has no concept of a date-type 
variable and even less concept of the meaning of a string 
variable. 

I guess this underlies at least part of the problem you have 
here. 

Nick 
[email protected] 

Dave Ewart
 
> > Can you suggest a way to 'transparently' import these dates as
> > 'proper' date variables?
> 
> Reply aimed at Kevin Crow:
> 
> Joseph Coveney's very helpful workaround notwithstanding, can I assume
> that a direct import of date-type values over ODBC in this 
> manner is not
> possible with Stata?
> 
> Is this considered a bug by the Stata developers?  (This isn't a
> criticism, rather a request for clarification!)
 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index