Date field in a table

C

CiceroCF

I am trying to insert a date field in a table to show Month Year. I found
the format and changed it to mmm yy. But when i put in months and years into
the table, ie. Mar 06 Sep 05, it changes them to 06 Mar 06 and 05 Sep
06. Is there away to change it so if i enter Mar 05 it will recognize it as
Mar 2005 instead of 05 Mar 2006?
Thanks for your help
Carl
 
D

Douglas J Steele

Date fields must hold complete dates. This is because, under the covers, a
date field is an 8 byte floating point number (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).

You'll either have to store month and year as separate fields, or decide
that you'll always store, say, the 1st of the month, or the 15th of the
month and use date field.
 
C

CiceroCF

i was afraid of that, just means a lil more typing for me then.

Thanks for your help..
Carl
 
D

Douglas J Steele

Not necessarily.

If you store Year and Month as separate fields, you just have to provide
values for them. You could even use combo boxes, to ensure no errors are
made in the typing.

Even if you use a date field, you could put code in the box's BeforeUpdate
event to intercept what you typed and automatically add whatever day you
selected. Since you've set the format to mmm yy, no one would be the wiser.
 

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

Top