A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Getting external data from Excel.



 
 
Thread Tools Display Modes
  #1  
Old December 14th, 2006, 10:15 PM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 6
Default Getting external data from Excel.

When I import an Excel 97 spreadsheet into Access 2003, the DATE column
with the format DD/M/YY is imported in a strange format, example:

EXCEL: 10/2/06
Imported into Access 97: 389982

Anybody have an idea what this is happening?

Thanks,

--TJ

  #2  
Old December 15th, 2006, 02:15 AM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Getting external data from Excel.

Do you mean 38992? Believe it or not, that's 2 October, 2006.

VBA stores dates as 8 byte floating point numbers, where the integer portion
represents the date as the number of days relative to 30 Dec, 1899, and the
decimal portion represents the time as a fraction of a day. 2 Oct 2006 just
happened to be 38,992 days since 30 Dec, 1899.

Just put the appropriate Format on the field.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


wrote in message
ps.com...
When I import an Excel 97 spreadsheet into Access 2003, the DATE column
with the format DD/M/YY is imported in a strange format, example:

EXCEL: 10/2/06
Imported into Access 97: 389982

Anybody have an idea what this is happening?

Thanks,

--TJ



  #3  
Old December 19th, 2006, 04:55 PM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 6
Default Getting external data from Excel.

Ok, so I right-click the excel cell, click format, and select the
appropriate date format, then import it into an Access db table? I've
tried this and the cells are still having the fraction format. Do I
have to change the format from 2/10/2006 to 2102006?

Thanks,


--TJ

Douglas J. Steele wrote:
Do you mean 38992? Believe it or not, that's 2 October, 2006.

VBA stores dates as 8 byte floating point numbers, where the integer portion
represents the date as the number of days relative to 30 Dec, 1899, and the
decimal portion represents the time as a fraction of a day. 2 Oct 2006 just
happened to be 38,992 days since 30 Dec, 1899.

Just put the appropriate Format on the field.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


wrote in message
ps.com...
When I import an Excel 97 spreadsheet into Access 2003, the DATE column
with the format DD/M/YY is imported in a strange format, example:

EXCEL: 10/2/06
Imported into Access 97: 389982

Anybody have an idea what this is happening?

Thanks,

--TJ


  #4  
Old December 19th, 2006, 07:46 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Getting external data from Excel.

I meant apply the appropriate format in Access, not in Excel.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


wrote in message
ps.com...
Ok, so I right-click the excel cell, click format, and select the
appropriate date format, then import it into an Access db table? I've
tried this and the cells are still having the fraction format. Do I
have to change the format from 2/10/2006 to 2102006?

Thanks,


--TJ

Douglas J. Steele wrote:
Do you mean 38992? Believe it or not, that's 2 October, 2006.

VBA stores dates as 8 byte floating point numbers, where the integer
portion
represents the date as the number of days relative to 30 Dec, 1899, and
the
decimal portion represents the time as a fraction of a day. 2 Oct 2006
just
happened to be 38,992 days since 30 Dec, 1899.

Just put the appropriate Format on the field.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


wrote in message
ps.com...
When I import an Excel 97 spreadsheet into Access 2003, the DATE column
with the format DD/M/YY is imported in a strange format, example:

EXCEL: 10/2/06
Imported into Access 97: 389982

Anybody have an idea what this is happening?

Thanks,

--TJ




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:03 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.