+ Reply to Thread
Results 1 to 6 of 6

Date format to Number format

  1. #1
    Forum Contributor
    Join Date
    11-24-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    225

    Date format to Number format

    Dear all

    I have convert the date format 20040106. But when I use this date to create a ID, it shows the value 37992 instead of 20040106. Even if I copy and paste this as number format, it still shows the value 37992. How to solve this?

    Thanks in advance.

    Regards
    Shams

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Date format to Number format

    37992 is the date code for jan 6 2004
    wrap whatever formula you used to convert the date with in text()
    =text(your formula,"yyyymmdd")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Contributor
    Join Date
    11-24-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    225

    Re: Date format to Number format

    Hi

    Thanks for suggestion. In K column it shows the 37992. How to convert it as text format as you said.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    11-24-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    225

    Re: Date format to Number format

    Dear Martin

    Thanks for solution. Please see the excel file in K column. How to get it done according to your advice using text format.

    Regards
    Shams

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Date format to Number format

    =TEXT(G2,"000000")&H2&TEXT(E2,"yyyymmdd") the first part may be needed as text in case your "Acquiror
    DatastreamvCode" is in the format 009761 or just 9761 it will pad it out to 6 digits
    Last edited by martindwilson; 08-11-2013 at 07:16 AM.

  6. #6
    Forum Contributor
    Join Date
    11-24-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    225

    Re: Date format to Number format

    Thank you very much.

+ 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. Change backwards number format to date format
    By vickie10200 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-10-2013, 01:32 PM
  2. Convert date and time in serial number format to text format
    By nda13112 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-11-2013, 02:45 PM
  3. [SOLVED] How to convert date format into number format (VBA)
    By Gaz_m2k5 in forum Excel General
    Replies: 4
    Last Post: 03-29-2012, 10:39 AM
  4. Convert date from date format to number format
    By althea10 in forum Excel General
    Replies: 2
    Last Post: 02-17-2011, 10:54 AM
  5. [SOLVED] * next to date format in Format>cells Number tab
    By Marco18+ in forum Excel General
    Replies: 6
    Last Post: 04-05-2006, 03:45 PM

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