Custom Date Function MM/YYYY

  • Thread starter Thread starter nickelpar
  • Start date Start date
N

nickelpar

Anyone have or can tell me how to write a module for a
custom date function to return a MM/YYYY format for a
short date (10/16/03 to 10/2003)?
 
Internally, Access stores the date as a floating point number.

Just use the Format() function e.g.:
Format([SomeField], "mm/yyyy")
 
Anyone have or can tell me how to write a module for a
custom date function to return a MM/YYYY format for a
short date (10/16/03 to 10/2003)?

No module or function is needed. Simply set the Format property of a
textbox to

mm/yyyy

The Date value is stored internally as a Double Float count of days
and fractions of a day; the format is whatever you want it to be. If
you need a mm/yyyy text string in code you can just use the builtin
Format function:

strDate = Format([datefield], "mm/yyyy")
 
Back
Top