Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8405819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:55:50+00:00 2026-06-09T22:55:50+00:00

I have a text file with format mmm-yy (all months are 3 letter abbrev,

  • 0

I have a text file with format mmm-yy (all months are 3 letter abbrev, e.g. Jan, Feb, Mar)

May-31

Which means, “May, 1931”.

If I use the following in a query:

CDate([BIRTHDT])

I get May 31, 2012, instead of May 1, 1931. The other rows, which have years that are later, like May-32, give the desired result of May 1, 1932. Obviously this has to do with the ms-access text to date conversion function mmm-dd validity checking having higher priority over the likely less common mmm-yy format, but it gives unexpected results in this case.

So somehow I need to extract month from the first 3 chars, year from last 2 digits, and combine them. Ideally I’d like to do this all within MS Access SQL.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T22:55:52+00:00Added an answer on June 9, 2026 at 10:55 pm

    “I need to extract month from the first 3 chars, year from last 2 digits, and combine them. Ideally I’d like to do this all within MS Access SQL.“

    Here is a session in the Immediate window.

    BIRTHDT = "May-31"
    ? BIRTHDT
    May-31
    ? Left(BIRTHDT,3) & "-1-" & Right(BIRTHDT,2)
    May-1-31
    ? CDate(Left(BIRTHDT,3) & "-1-" & Right(BIRTHDT,2))
    5/1/1931
    

    So you could use that expression in a query.

    SELECT CDate(Left(BIRTHDT,3) & "-1-" & Right(BIRTHDT,2))
    FROM YourTable;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two fields in my text file which are timestamp number The format
I have a text file which contain rows in this format: com1,System Access,MinimumPasswordAge,1 com1,System
I have a text file in the format of: aaa: bcd;bcd;bcddd;aaa:bcd;bcd;bcd; Where bcd can
I have a text file with the format: (title,price,id#) CD1,11.00,111111 CD2,12.00,222222 CD3,13.00,333333 CD4,14.00,444444 CD5,15.00,555555
I have a text file containing the data in following format 12345 Abdt3 hy45d
I have a large text file in the format of. english word: spanish equivalent
I have a text file that contains cached data in JSON format. I'm trying
I have a list Dogs in a text file with the following format: id:fatherid:motherid:born:owner:breed
I have few Gigabytes text file in format: {user_ip:x.x.x.x, action_type:xxx, action_data:{some_key:some_value...},...} each entry is
Hi i have my text file in this format **4 1250000209852 01 XXXX XXXX

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.