+ Reply to Thread
Results 1 to 3 of 3

[SOLVED] Converting number or text to a Date Format

  1. #1
    samhain
    Guest

    [SOLVED] Converting number or text to a Date Format


    Hi there,

    First post.....

    I downloaded a file from my database (not access) which outputs the
    file to .txt

    Using excel I can set each colum for the text and it puts each piece of
    data in to a column etc. Very nice.

    One of the pieces of data I output from the system is a persons date of
    birth, however, it is shown as (an example) 19340101. I can convert this
    to something that looks nicer by using
    =RIGHT(A1,2)&"/"&MID(A1,5,2)&"/"&LEFT(A1,4) but that doesn't convert
    the number in to a date format.

    I need to convert 19340101 to 01/01/1934 in a date format that excel
    can understand.

    Any ideas.

    Thanks in advance.

    Stewart


    --
    samhain
    ------------------------------------------------------------------------
    samhain's Profile: http://www.hightechtalks.com/m92
    View this thread: http://www.hightechtalks.com/t2262615


  2. #2
    Bob Phillips
    Guest

    Re: Converting number or text to a Date Format

    Try a formula of

    =Date(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2))

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "samhain" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hi there,
    >
    > First post.....
    >
    > I downloaded a file from my database (not access) which outputs the
    > file to .txt
    >
    > Using excel I can set each colum for the text and it puts each piece of
    > data in to a column etc. Very nice.
    >
    > One of the pieces of data I output from the system is a persons date of
    > birth, however, it is shown as (an example) 19340101. I can convert this
    > to something that looks nicer by using
    > =RIGHT(A1,2)&"/"&MID(A1,5,2)&"/"&LEFT(A1,4) but that doesn't convert
    > the number in to a date format.
    >
    > I need to convert 19340101 to 01/01/1934 in a date format that excel
    > can understand.
    >
    > Any ideas.
    >
    > Thanks in advance.
    >
    > Stewart
    >
    >
    > --
    > samhain
    > ------------------------------------------------------------------------
    > samhain's Profile: http://www.hightechtalks.com/m92
    > View this thread: http://www.hightechtalks.com/t2262615
    >




  3. #3
    Dave Peterson
    Guest

    Re: Converting number or text to a Date Format

    Another way:
    select that column of "dates"
    data|text to columns
    fixed width -- but don't subdivide that field
    choose ymd (ydm???) as the field type
    format the way you want.



    samhain wrote:
    >
    > Hi there,
    >
    > First post.....
    >
    > I downloaded a file from my database (not access) which outputs the
    > file to .txt
    >
    > Using excel I can set each colum for the text and it puts each piece of
    > data in to a column etc. Very nice.
    >
    > One of the pieces of data I output from the system is a persons date of
    > birth, however, it is shown as (an example) 19340101. I can convert this
    > to something that looks nicer by using
    > =RIGHT(A1,2)&"/"&MID(A1,5,2)&"/"&LEFT(A1,4) but that doesn't convert
    > the number in to a date format.
    >
    > I need to convert 19340101 to 01/01/1934 in a date format that excel
    > can understand.
    >
    > Any ideas.
    >
    > Thanks in advance.
    >
    > Stewart
    >
    > --
    > samhain
    > ------------------------------------------------------------------------
    > samhain's Profile: http://www.hightechtalks.com/m92
    > View this thread: http://www.hightechtalks.com/t2262615


    --

    Dave Peterson

+ 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