pulling string values form date field

I have a date field [EndDate], I want to capture year and month and put them in a text field [RefPeriod] with the following text format yy-mmm

Example: for 30-Nov-13 in EndDate, I would like to have 13-Nov in RefPeriod

Thank you
fitalianoAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Rey Obrero (Capricorn1)Connect With a Mentor Commented:
=format(EndDate, "yy-mmm")
0
 
AccessGuy1763Connect With a Mentor Commented:
It should be:

Format([EndDate],"yy-mmm")

I would probably add it to the underlying record source for your form and then set the control source of [RefPeriod] to whatever you call the column in the record source.

Edit - you could also just add it directly to the control source as capricorn suggests.
0
 
Dale FyeCommented:
personally, I'd advise against storing this value, as it can always be recomputed when you need it via a query.
0
 
Gustav BrockCIOCommented:
Just use a textbox on your form bound to EndDate.
Then set the Format property of the textbox to:

  yy\-mmm

/gustav
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.