Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Date format question

Discussion in 'Information Technology' started by Bob in AZ, Nov 17, 2005.

  1. Bob in AZ

    Bob in AZ
    Expand Collapse
    Guest

    Am using Access 2003.
    Have created a new field in the db table called “E_Dateâ€. Format is
    “General Dateâ€.

    Want to extract the month from the field to use in a report. In my query, I
    have defined the “DateMonth†as: “DateMonth: DatePart("m",[E_Date])â€

    When I print the report, I get the numeric for the month. I.e. January is
    month 1, Feb = 2, etc.

    I want the full name of the month printed. But when I change the DateMonth
    definition to anything other than â€mâ€. I get “#error†on the report.

    What don’t I understand here? Any suggestions would be appreciated.

    Bob
    bpob@cox.net

    --
    Bob in AZ
     
  2. Loading...


  3. Rick Brandt

    Rick Brandt
    Expand Collapse
    Guest

    "Bob in AZ" <BobinAZ@discussions.microsoft.com> wrote in message
    news:7199481F-AA0C-405B-A75A-D600F25DE412@microsoft.com...
    >
    > Am using Access 2003.
    > Have created a new field in the db table called "E_Date". Format is
    > "General Date".
    >
    > Want to extract the month from the field to use in a report. In my query, I
    > have defined the "DateMonth" as: "DateMonth: DatePart("m",[E_Date])"
    >
    > When I print the report, I get the numeric for the month. I.e. January is
    > month 1, Feb = 2, etc.
    >
    > I want the full name of the month printed. But when I change the DateMonth
    > definition to anything other than "m". I get "#error" on the report.
    >
    > What don't I understand here? Any suggestions would be appreciated.


    If you read the help file topic for DatePart you will see that it is working
    exactly as it should. Use the Format() function instead.

    DateMonth: Format([E_Date], "mmmm")

    --
    I don't check the Email account attached
    to this message. Send instead to...
    RBrandt at Hunter dot com
     
  4. Allen Browne

    Allen Browne
    Expand Collapse
    Guest

    Just leave the text box bound to the date field, and set its Format property
    to:
    mmmm

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia.
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "Bob in AZ" <BobinAZ@discussions.microsoft.com> wrote in message
    news:7199481F-AA0C-405B-A75A-D600F25DE412@microsoft.com...
    >
    > Am using Access 2003.
    > Have created a new field in the db table called "E_Date". Format is
    > "General Date".
    >
    > Want to extract the month from the field to use in a report. In my query,
    > I
    > have defined the "DateMonth" as: "DateMonth: DatePart("m",[E_Date])"
    >
    > When I print the report, I get the numeric for the month. I.e. January is
    > month 1, Feb = 2, etc.
    >
    > I want the full name of the month printed. But when I change the
    > DateMonth
    > definition to anything other than "m". I get "#error" on the report.
    >
    > What don't I understand here? Any suggestions would be appreciated.
     

Share This Page