Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Trouble 1

Status
Not open for further replies.

NSGuard

MIS
Jul 15, 2004
29
US
I am trying to edit the input mask of a Birthday field. The only data I want to be entered is the Month and the Day, not the year. I've tried mm/dd and 99/99, and neither of them work, they always default to mm/dd/yyyy. This is most likely very easy, I am just probably going about it the wrong way. Thanks for you help.
 
I would change the data type of the field to text, then your input mask should work.
Ken

- If you are flammable and have legs, you are never blocking a fire exit.
Mitch Hedburg
 
Thanks, Ken and hneal. I am still experiencing problems with both of your ideas.

With Kens help.. if I change it to a text box I cannot sort it by month in the report like I had planned to, plus it doesn't read it as a month.

With hneal's help.. that still outputs it in the full date, mm/dd/yyyy.

I appreciate your guys help, will keep trying. thanks again.
 
outputs it from where? Is this in a textbox, table, etc...?
 
I am pulling the Date from a table. I just want to store the Month and the Day of the birtday, b/c the users don't want their ages shown. All they actually want is a report that shows everyones birtdays. Sorted by month and then by Day. I think I am just making this harder than it should be.
 
then use the format method:

Code:
=format(DateField, "mm/dd")
 
I might not understand the complexity here but if all you are doing is displaying this field on a report then isn't it possible to just throw a "mm/dd" format on that particular field on the report and not display the year?

On the query for the report, use the following to sort the data...

Month(birthdate)
Ascending

??? Is this what you want?
 
Where exactly do I use that code, sorry for all of the questions
 
I could do that groundclutter, but I am trying to eliminate the year from the table all together. So I don't run into Date problems elsewhere, b/c half of the users submit their full birthdays while others don't submit the year.
 
in the textbox you are using, put that in the Format property of the textbox.
 
I figured that out right after I sent that last reply. thanks for your help!
 
Well, if you make the mask on the table field "99/99;0;_" then it will always default to the current year which probably won't be good next year...unless you just default a year on the entry each and every time someone enters a birth date. Sorry couldn't help more...

GC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top