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

Re: st: Date format export to excel

From   Neil Shephard <>
Subject   Re: st: Date format export to excel
Date   Wed, 10 Dec 2008 11:29:26 +0000

Ashim Kapoor wrote:
> Hello everyone,
> I have a stata file where I have formatted the date in a  MONTHLY
> format ie  . format %tmMon_CCYY
> When I export this file to excel saying outsing using 10.xls SOME of
> my dates get messed up. Has anyone else experienced this ?
When you say "SOME" of your dates get messed up, what do you mean? 
Could you provide an example of how Excel is correctly interpreting
dates and an example of some that are being mis-interpreted.  Otherwise
people will only be able to guess if they have experienced what you are

I'd also avoid -outsheet-ing to a file with the extension ".xls" since
this implies that it is an Excel formatted file, which is not the case
since -outsheet- writes to ASCII text files, and by default uses <Tab>
as a delimiter (although this can be modified using the -, comma- or -,
delim("char")- options).  If you use the -,comma- option the giving your
file the extensions ".csv" you will likely find that particular file
extension is already associated with Excel, and double-clicking the file
from Explorer will invoke Excel which will then attempt to import your
data (assuming your on a windows OS with standard Excel installation).


"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein

This  message  may  contain  confidential and  privileged  information.
If you  are not the  intended recipient  you should not  disclose, copy
or distribute information in this e-mail or take any action in reliance
on its contents.  To do so is strictly  prohibited and may be unlawful.
Please  inform  the  sender that  this  message has  gone astray before
deleting it.  Thank you.

2008 marks the 60th anniversary of the NHS.  It's an opportunity to pay
tribute to the NHS staff and volunteers who help shape the service, and
celebrate their achievements.

If you work for the NHS  and  would like  an NHSmail  email account, go

*   For searches and help try:

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