Access date formats: mm/dd/ NO year

  • Thread starter Thread starter Date format: No Year
  • Start date Start date
D

Date format: No Year

I need to enter birthday and anniversary dates, where there is no year given.
Just mm/dd. Thanks for input. Mary
 
I need to enter birthday and anniversary dates, where there is no year
given. Just mm/dd. Thanks for input. Mary

You have two choices. Enter a dummy year or don't use a DateTime as your
data type. A DateTime value is not capable of not having a year.

You can always enter a year and use formatting to only display month/day.
 
Actually, if you enter a month and day, but no year, into a date field,
Access is going to add the current year to it! Then, as Rick said, you can
use the Format() function to only display the month and day.

Given today's month/date

Format(BirthDate,"mm/dd") yields  11/24

Format(BirthDate,"mmm dd") yields  Nov 24

Format(BirthDate,"mmmm dd") yields  November 24

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/access-gettingstarted/20...

Be careful about trying to use a date/time field to hold the value
(only displaying the month and day) You will have to break that field
down to month and day to do apply any selections since there WILL be
an associate year with each entry.

Also sorting on that field may give you unusual results since there
will be a year. If you select the months of sept and October, and sort
you will end up with a sequence of Sept year1 Oct year1 Sept
Year2 Oct year 2
This is because dates sort as if you always sorted Year/
Month/.day.

Good Luck.

Ron
 
Back
Top