Short Date

  • Thread starter Thread starter DCost
  • Start date Start date
D

DCost

How do I make a date appear 10/03? The input mask in the
table does not allow that choice.
 
How do I make a date appear 10/03? The input mask in the
table does not allow that choice.

The Input Mask just controls the characters that you can type - what
you need is the Format property of the control instead. Set it to

mm/dd

The Date/Time value will be stored as a double float number, but you
can format it any way you like - see the online help for "Custom
Formats" and drill down to find custom date formats, there are lots of
options.
 
ShortMonthYear = Month(Date) & "/" & Right(Year(Date),2)
Here, Date is a variable.

For a literal date, enclose it with #, as follows:
ShortMonthYear =
Month(#10/11/03#) & "/" & Right(Year(#10/11/03#),2)

or, more simply, just set the Format property of the control to

mm/yy
 
Yes. I guess I assumed it would be used in code, so the
simpler approach would be:
ShortMonthYear = Format(Date, "mm/yy")
 
Back
Top