Formating Date mmyyyy

  • Thread starter Thread starter Jazz57
  • Start date Start date
J

Jazz57

Good afternoon to all

I have a date field in the format "dd-mm-yyyy" - short date
I have a need to extract 2 field or maybe 1 field with :

2 fields 1 field with the month and another with the year

1 field with month year mmyyyy

Is this possible? If so how can i do it.

i have to make this in order a Query can transfer data to Excel

Thanks in advance for any help provided.
 
Hi -

First, you don't have a date field with the short date format; you have a
date/time field which you are displayimg as a short date. A date format is
for display purposes only, and does not affect the internal storage of the
date. You can use the format function to display the date in any format you
wish - in your case it would be something like:

Format([mydatefield],"mmyyyy").

This of course assumes that your table field is date/time type to begin with.

John
 
hi John

Thanks a lot for your observation and correction.

However i must say that your solution doesn't work.

i did what you said, and i retrieve on My Query (12yyyy)

i had seen twice your onstruction and is Ok.

Any idea of what can be wrong??

Thanks for your help

--
Adriano Santos



"J_Goddard via AccessMonster.com" escreveu:
Hi -

First, you don't have a date field with the short date format; you have a
date/time field which you are displayimg as a short date. A date format is
for display purposes only, and does not affect the internal storage of the
date. You can use the format function to display the date in any format you
wish - in your case it would be something like:

Format([mydatefield],"mmyyyy").

This of course assumes that your table field is date/time type to begin with.

John




Good afternoon to all

I have a date field in the format "dd-mm-yyyy" - short date
I have a need to extract 2 field or maybe 1 field with :

2 fields 1 field with the month and another with the year

1 field with month year mmyyyy

Is this possible? If so how can i do it.

i have to make this in order a Query can transfer data to Excel

Thanks in advance for any help provided.
 
Back
Top