Convert Date Format

  • Thread starter mattc66 via AccessMonster.com
  • 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
 
T

Tom Ellison

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
 
R

Rick B

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.
 
M

mattc66 via AccessMonster.com

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Format Text as Date 1
convert a date 4
extract just month/year from table field?? 2
convert date 1
Formatting date gives bad results in query 2
Date format in query export. 4
Date() update format 5
Convert Date 1

Top