Convert Date Format

  • Thread starter Thread starter mattc66 via AccessMonster.com
  • Start date Start date
M

mattc66 via AccessMonster.com

Hi All,

I am converting data in an old computer system. The date format required is
YYMMDD. However the data I have that needs to be converted is MM/DD/YYYY.
What can I do to change the format of this date to the older style.

From> MM/DD/YYYY To> YYMMDD (Note the from has the "/ /" that cannot be
used in the older system.

Thanks
Matt
 
Dear Matt:

For the purpose of storing a date in a date/time datatype, there is no
"required format" regarding how it is stored. If the source data is a
string that appears as MM/DD/YYYY then it should fit right in automatically.

So, I'm confused how it is you're having any problem with this at all. Are
you putting this value in a date/time datatype column? Could you show some
sample data?

AFTER you get this into the table, you can set the format with which you
want it to display. However, it will not be stored in that format.
Date/time values are stored as, well, data/time values, and are then
formatted as you require when displayed. You can change and change again
how it is formatted for display, but the value stored will not change.

Tom Ellison
 
Not sure what you are trying to do with the data. Are you trying to convert
it to a particular format, then take the results and load it into that old
system?

Regardless, you can format a date in any manner you wish. This can be done
in the queries, forms, and reports. To do this in the query (most likely
what you will need if exporting data) you would add your date field to the
query grid. Right-Click on the field and select "Properties". In the
FORMAT field put the following...

MMDDYY


When you run your query, the date will display as MMDDYY.
 
Thank you - that was too easy.. Worked great!

Rick said:
Not sure what you are trying to do with the data. Are you trying to convert
it to a particular format, then take the results and load it into that old
system?

Regardless, you can format a date in any manner you wish. This can be done
in the queries, forms, and reports. To do this in the query (most likely
what you will need if exporting data) you would add your date field to the
query grid. Right-Click on the field and select "Properties". In the
FORMAT field put the following...

MMDDYY

When you run your query, the date will display as MMDDYY.
[quoted text clipped - 8 lines]
Thanks
Matt
 
Back
Top