+ Reply to Thread
Results 1 to 5 of 5

Fixing Date Formatting.

  1. #1
    Registered User
    Join Date
    07-17-2013
    Location
    Columbia, MO
    MS-Off Ver
    Excel 2010
    Posts
    3

    Fixing Date Formatting.

    Hi everyone,
    I apologize if this is a constantly covered topic, but I've searched Google high and low, and haven't been able to find anything that could successfully help me out.
    I've tried myself and things I've found on Google, but so far with no luck.
    The Company i work for has asked me to create an excel spreadsheet that's just a pretty simple document to send to our clients.
    I've got the rows and columns for Names and Comments without too much problem, but while trying to set up the Date of Birth and Date of Service columns i'm running into a wall.
    The place i work for enters dates into our medical program as, for example:041786 to get it to show up as 04/17/1986 in the program.
    I was hoping to get excel to do the same thing, but for some odd reason it seems to be figuring out the dates in a different way. When i type 041786 into it comes up at 05/27/14. I'm not sure how it's getting to this, or if it's taking the current date into account for some reason. I was hoping to format the column for the DOS in the same way.
    I've got a formula for the patient's age which seems to be working alright, so now my primary issue is figuring out what Excel magic is changing the date on me.

    tl;dr: Trying to make the date entered as 010204 come up at 01/02/2004, but i'm awful with Excel.

    Thanks in advance for any advice, everyone.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Fixing Date Formatting.

    Actionhank1786,

    Welcome to the forum!
    Attached is an example workbook based on the criteria you described.
    Row 1 is a header row so actual data starts in row 2
    Column A contains Names
    Column B contains the date entry in the format that you will be entering it (041786, 010204, etc)
    Column C contains the date entry converted to the desired date.

    In order to get the leading 0 to stay, column B has had a custom format applied to it of "000000" (no quotes)
    In order for the date to show as desired after conversion, column C has had a custom format applied to it of "mm/dd/yyyy" (no quotes)
    In cell C2 and copied down is this formula to perform the date conversion:
    Please Login or Register  to view this content.
    Does that work for you?
    Attached Files Attached Files
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    07-17-2013
    Location
    Columbia, MO
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Fixing Date Formatting.

    I will give this a shot, and see what happens.
    Thanks for the quick reply! You may have just saved my desk from a violent collision with my face.

    :edit:
    I was curious, is there a way to get this to appear in just one column?
    They're wanting a lot crammed into one page, so i've landscaped it, but having a section for DOB, and then the converted DOB would take up an extra column.
    Would i just be able to edit the formula to change whatever i type into the column from 041786 into 04/17/86?
    Last edited by Actionhank1786; 07-17-2013 at 11:58 AM.

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Fixing Date Formatting.

    You could use the Text to columns feature to convert the entries to MDY dates, but you'd need to change the format of the column afterwards to the mm/dd/yyyy format, and repeating the process if you added or changed dates later would be a hassle. Other than that you would need VBA to convert the entries into the desired dates within the same cell on the fly.

    Easier than either of those however, would be to simply hide the Date Entry column(s) whenever you're presenting the data as a report or printing it out.

  5. #5
    Registered User
    Join Date
    07-17-2013
    Location
    Columbia, MO
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Fixing Date Formatting.

    Quote Originally Posted by tigeravatar View Post
    You could use the Text to columns feature to convert the entries to MDY dates, but you'd need to change the format of the column afterwards to the mm/dd/yyyy format, and repeating the process if you added or changed dates later would be a hassle. Other than that you would need VBA to convert the entries into the desired dates within the same cell on the fly.

    Easier than either of those however, would be to simply hide the Date Entry column(s) whenever you're presenting the data as a report or printing it out.
    Ahh, so, essentially the dates would have to be entered first, then converted?
    I guess i'll just tell them they will have to type the / in the date. It won't be a big deal for anyone, i just figured it might be a little quicker if they could type the numbers straight in and not have to take those extra key strokes to hit the forward slash. It won't be a big deal though.
    Thanks for all the help! I'll definitely have to save that spreadsheet for future reference.

+ 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. Fixing Date Error -
    By JCL622 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-07-2013, 10:54 AM
  2. [SOLVED] fixing today's date
    By noexcel=badwork in forum Excel General
    Replies: 9
    Last Post: 07-17-2012, 04:49 AM
  3. fixing date formats
    By Lloyddobler in forum Excel General
    Replies: 2
    Last Post: 09-10-2009, 01:03 PM
  4. fixing a date formula
    By NYBoy in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 07-13-2008, 07:54 PM
  5. Fixing the date.
    By cs2883 in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 10-07-2005, 02:40 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