date format

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two dates in excel spreadsheet. They are in format mm/dd/yyyy. They
are an enrollment date and withdraw date. I need to import these into Access
table and will also have a 3rd field in Access table that will be number of
days. This will have to be calculated....withdraw date minus enrollment
date. Not sure how to do this....plus, how do I get the dates into Access
table from mm/dd/yyyy to yyyymmdd?

Thanks
 
I too am trying to convert the date to "YYYYMMDD" but can
not figure it out. Upon importing the data, you have
options to select the date format, however you will have
the "/" in the date fields. Also I think your going to
have to go to your control pannel, regional settings and
change your default date setting.
 
I have used sql with DB2 for years...but this Access is
entirely new..so...
not sure what Right(...) & Left (..) & Mid(...) is..
can you steer me in right direction so I can read up on
something..

Thanks
 
Hi,

A date is internally represented as a number, that means today, 17 Aug. 04 =
38216, that menas it's the 38216th day since the start of the internal
calendar.
Therefore if you want to find out difference between two dates in days you
can really use something like NumberOfDays = Date1 - Date2. If you create a
query add an additional field and place in there NumberOfDays : Date1 -
Date2. That's it.

Btw: 17/Aug/04 6 a.m. = 38216.25; 17/Aug/04 6 p.m. = 38216.75 That means
hours, minutes and seconds are shown as decimals.

If you want the date displayed as yyyymmdd only because you want to
calculate the difference in days it is not necessary to re-format etc.

Bernd
 
Back
Top