Results 1 to 3 of 3

Thread: Changing a date to text string
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Dec 2014
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Changing a date to text string

    In converting to a different program I need to change the dates into a piece of text for the upload file.
    Existing program requires the dates to be in a standard date format: 2014-12-15. The new program requires the dates to be a text string 12152014 (not a date, just a text string) How can I convert the column of dates into a text string. Anything I ve tried to change the date to a piece of text just changes the date to it s underlying serial number.

  2. #2
    MrExcel MVP
    Join Date
    May 2009
    Posts
    16,503
    Post Thanks / Like
    Mentioned
    38 Post(s)
    Tagged
    8 Thread(s)

    Default Re: Changing a date to text string

    Sheet1

    * A B C
    1 2014-12-15 12152014 2

    Spreadsheet Formulas
    Cell Formula
    B1 =TEXT(A1,"mmddyyyy")
    C1 =TYPE(B1)


    Excel tables to the web >> Excel Jeanie HTML 4
    Joe

    When I was a young man I knew everything. Now that I'm older, I realize I know very little, and what I do know, I tend to forget!

  3. #3
    MrExcel MVP Rick Rothstein's Avatar
    Join Date
    Apr 2011
    Location
    New Jersey, USA
    Posts
    35,251
    Post Thanks / Like
    Mentioned
    92 Post(s)
    Tagged
    33 Thread(s)

    Default Re: Changing a date to text string

    Quote Originally Posted by djbwantstoknow View Post
    In converting to a different program I need to change the dates into a piece of text for the upload file.
    Existing program requires the dates to be in a standard date format: 2014-12-15. The new program requires the dates to be a text string 12152014 (not a date, just a text string) How can I convert the column of dates into a text string. Anything I ve tried to change the date to a piece of text just changes the date to it s underlying serial number.
    Assuming your dates start in cell A2, put this formula...

    =TEXT(A2,"mmddyyyy")

    in Row 2 of an unused column and copy it down to the end of the data in Column A (where I have assumed your dates to be located at), then select all those cells where you just put the formula and copy them, then (assuming you want to overwrite your real dates with their text equivalents) select cell A2 and then use "Paste Special/Values" to perform the overwrite.
    Rick's "mini" blog... http://www.excelfox.com/forum/f22/
    .
    Want to post a small screen shot? See Part B here.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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