+ Reply to Thread
Results 1 to 5 of 5

Convert text month to alpha

  1. #1
    Registered User
    Join Date
    03-20-2009
    Location
    Phila, PA
    MS-Off Ver
    Excel 2003
    Posts
    56

    Convert text month to alpha

    I have a database with dates stored as 2 digits yy, mm, dd in three separate text fields.
    I wish to produce a report that will convert the mm field to the alpha equivalent, i.e.August = 08 or May = 05.

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Convert text month to alpha

    Two options.

    One:

    Add a lookup table like:

    Please Login or Register  to view this content.
    and join it to your month field.

    Two:

    Rebuild your date, then take the Month text:

    Please Login or Register  to view this content.
    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Convert text month to alpha

    If you only want the month name can you not use

    Format([monthfield]*30,"mmmm")

    Or *29 depending on what start date Access uses.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Convert text month to alpha

    Yes, nice one Andy!

  5. #5
    Registered User
    Join Date
    03-20-2009
    Location
    Phila, PA
    MS-Off Ver
    Excel 2003
    Posts
    56

    Re: Convert text month to alpha

    Thank you Andy! Although I was trying to embed the formatting in the report field, I instead added a field to the query and use that as the control source for the report field.I added this field: startm: Format([startmonth]*30,"mmmm"). Then in the report, where the month would be I changed the control source for the label to be startm.

    Thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1