Passing Date format on part of a control

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Brilstern
    New Member
    • Dec 2011
    • 208

    Passing Date format on part of a control

    Q: How do i use a date format on part of a control.

    I have a control
    Code:
    =[EAS] & "    Section: " & [Instrument]
    I want to pass a format on the EAS field to be YYYYMMDD.

    This is what I have used previosly but within a single control. How do i use this format on the EAS part of the control.
    Code:
    =Format(Date(),"YYYYMMDD")
    I have looked but nothing refers to only part of the control.

    Sgt B
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    I'm not quite sure what you mean. I think you mean that you want to format EAS, which is a date.
    Code:
    =Format([EAS],"YYYYMMDD") & "    Section: " & [Instrument]

    Comment

    • Brilstern
      New Member
      • Dec 2011
      • 208

      #3
      I didn't try it with just the Format() without Date(). But this makes since. I will try it when I get to work in the morning. Thx

      Sgt B

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32633

        #4
        Assuming your [EAS] field is a Date format field (which is implied by your question) then Rabbit's solution is what you want (Single quotes (') may be advised as it's handled by Jet - but that's being pretty picky and the double quotes will work fine in Access).

        Comment

        Working...