Welcome to SPN

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

Sign Up Now!
  1. Guest ji, please consider donating today!
      Become a Supporter    ::   Make a Contribution   
    Monthly Recurring Target: $300 :: Achieved: $95

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.
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page