+ Reply to Thread
Results 1 to 3 of 3

Change date serial to actual date numbers

  1. #1
    Registered User
    Join Date
    02-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    14

    Change date serial to actual date numbers

    Hello,

    I'm writing a macro that will take data that is exported from our database and re-organize it in order to re-upload it. Sounds silly, and it is, but it's easier than transferring the data within the database by hand. My main issue is converting the value in the date cells from the date's serial number to the actual date in numbers. For instance, if the database gives me the data 2/12/2012, Excel records this value as the serial 40951. However, I need the value to be yyyymmdd (20120212 in this instance). I know that it can be formatted to "show" this, but I need the actual value in the cell to be this number (which will then be formatted as text). Can anyone help me do this?

    Thanks,

    Scott

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,695

    Re: Change date serial to actual date numbers

    You can use:

    =TEXT(A1,"YYYYMMDD")

    in a helper cell, copy down as required, fix the values, then copy/paste over the original cell(s) and delete the helper column.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    02-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Change date serial to actual date numbers

    Perfect, thanks! I knew it had to be an easy fix, just couldn't think of what that fix was.

+ 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