[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 288
  • Last Modified:

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
0
fitaliano
Asked:
fitaliano
2 Solutions
 
Rey Obrero (Capricorn1)Commented:
=format(EndDate, "yy-mmm")
0
 
AccessGuy1763Commented:
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

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now