+ Reply to Thread
Results 1 to 7 of 7

Formating Date from 8/5/13 to 20130805

  1. #1
    Registered User
    Join Date
    08-01-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Formating Date from 8/5/13 to 20130805

    Hi

    I was wondering how to format a date from 8/5/13 from one cell and 20130805 to another.
    My purpose is to use the string of numbers as a item code/identifier.
    Please advise, thanks!

    PS Update: In a more advance question, which I'll post later on, I'm hoping to add a title after those string of number base on something else I have in another cell.

    ie. 8/5/13 Item Name --> 20130805_ItemName

    THanks!

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Formating Date from 8/5/13 to 20130805

    You could try (if you're not looking for a format but a formula) this...
    =YEAR(E76)&"0"&MONTH(E76)&"0"&DAY(E76)
    where 8/5/13 is in cell e76, just substitute the cell it is located in.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Formating Date from 8/5/13 to 20130805

    With 8/5/13 in A1 and some text in B1, in another cell:

    =YEAR(A1) & TEXT(MONTH(A1),"00") & TEXT(DAY(A1),"00") & "_" & B1
    Gary's Student

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Formating Date from 8/5/13 to 20130805

    Would recommend using Jakobshavn's over mine since if the month or day becomes a double digit mine still adds a 0 to it so his looks better.

  5. #5
    Valued Forum Contributor
    Join Date
    05-20-2013
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2013
    Posts
    941

    Re: Formating Date from 8/5/13 to 20130805

    Date in A1, text-to-add in B1...

    =TEXT(A1,"yyyymmdd")&"_"&B1

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Formating Date from 8/5/13 to 20130805

    or just use custom formatting yyyymmdd

    edit: sorry, didnt read the "to use the string of numbers as a item code/identifier" part, but you may still be able to use the 5-digit date number for what you want, without doing anything else
    Last edited by FDibbins; 08-05-2013 at 01:47 PM.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  7. #7
    Registered User
    Join Date
    08-01-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Formating Date from 8/5/13 to 20130805

    Thank you guys! all solutions were amazing!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Date Formating
    By britinva in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-12-2013, 04:04 PM
  2. Conditional Formating of cells based on today's date, and another date
    By dviolante10 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-24-2012, 02:32 PM
  3. Replies: 6
    Last Post: 01-17-2011, 10:34 AM
  4. Date Formating
    By HammerTime in forum Excel General
    Replies: 3
    Last Post: 08-21-2008, 08:19 PM
  5. date formating
    By JLDSALLTHAT in forum Excel General
    Replies: 4
    Last Post: 03-01-2007, 05:02 AM

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