Shubha Vishwanath Karanth
2011-Jan-18 10:35 UTC
[R] Dates when transferred from RExcel to R.
Hi R, The dates when exported from Excel to R by "Put R Var", gives one less day. For example, 1. Let 1/1/2011 be the cell A1 in date format. 2. Right click and select "Put R Var" and give a name to it say, "StartDate" (R in foreground process) 3. In the R console see the value stored in "StartDate" 4. The output is:> StartDate[1] "2010-12-31 23:30:00 IST" Please note that this output is 30 minutes less than the actual date. Why is this? Thanks and Regards, Shubha This e-mail may contain confidential and/or privileged i...{{dropped:13}}
I think it is called "time zones". Is "IST" India standard time, if so that accounts for the half hour. What is your time zone and what is the time zone of the data coming from Excel? Exactly how are you importing it? On Tue, Jan 18, 2011 at 5:35 AM, Shubha Vishwanath Karanth <shubhak at ambaresearch.com> wrote:> Hi R, > > > > The dates when exported from Excel to R by "Put R Var", gives one less > day. > > > > For example, > > 1. ? ?Let 1/1/2011 be the cell A1 in date format. > > 2. ? ?Right click and select "Put R Var" and give a name to it say, > "StartDate" (R in foreground process) > > 3. ? ?In the R console see the value stored in "StartDate" > > 4. ? ?The output is: > >> StartDate > > [1] "2010-12-31 23:30:00 IST" > > > > Please note that this output is 30 minutes less than the actual date. > Why is this? > > > > > > Thanks and Regards, > > Shubha > > > > > > This e-mail may contain confidential and/or privileged i...{{dropped:13}} > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Jim Holtman Data Munger Guru What is the problem that you are trying to solve?