Results 1 to 5 of 5
  1. #1
    rohitsinha is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2013
    Posts
    4

    Convert field like 19240525 format from .txt file to date format 05/25/1924 in access

    I have a text file with a datefield with an entry like 19240525



    This is equivalent to 05/25/1924.

    How do i convert this data(19240525) to 05/25/1924 when getting external data from the .txt file; Is it possible to do this?

    How do we do this and transport this to access in the date format ? When i simply put date field in Access, it gives me a Type Conversion error.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You can use the DateSerial() function along with the Mid() function to pull out each piece.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    rohitsinha is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2013
    Posts
    4
    Thank you so much - Appreciate it. I will do that.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help! Welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    rohitsinha is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2013
    Posts
    4
    Thanks Paul - In the days to come, I shall have many questions, am sure. Hope to have your and the community's support and help. Thanks again.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Convert seconds to HH:MM:SS format
    By sai_rlaf in forum Access
    Replies: 2
    Last Post: 01-19-2012, 12:57 AM
  2. Replies: 1
    Last Post: 08-07-2011, 07:58 AM
  3. Access Reports to different file format
    By mar_t in forum Access
    Replies: 3
    Last Post: 03-15-2011, 08:24 PM
  4. Convert date format yyyymmdd for datediff
    By TEN in forum Programming
    Replies: 1
    Last Post: 06-17-2009, 09:35 PM
  5. Replies: 1
    Last Post: 06-11-2009, 05:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums