+ Reply to Thread
Results 1 to 10 of 10

Change Date Format

  1. #1
    Registered User
    Join Date
    03-20-2016
    Location
    London
    MS-Off Ver
    10
    Posts
    8

    Change Date Format

    Hello there,

    is there any chance to change a date like: 26 Mar 2016 to the actual date, I need to have it as values (numbers or date)..

    Also I have a problem with data that I extracted and one cell is always adding an additional space at the end. I tried Trim(text) already but not working at all.


    thanks for help,

  2. #2
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: Change Date Format

    Try this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-20-2016
    Location
    London
    MS-Off Ver
    10
    Posts
    8

    Re: Change Date Format

    Hey thanks for quick response,

    its also not working, it think there is some problem with the inserted data, well there is also a space at the end.

    see attached excel maybe you can fix it in there ...
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: Change Date Format

    Hmm... you are right. That additional space at the end is weird. This should fix it:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: Change Date Format

    Hmm... you are right. That additional space at the end is weird. This should fix it:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    03-20-2016
    Location
    London
    MS-Off Ver
    10
    Posts
    8

    Re: Change Date Format

    Great thank you so much for help, it works perfectly!!

    Well just to understand for myself, I knew the trick with the TRIM function, but how would you do it if you only want to get rid of the space at the end for other cells that have the same problem?

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

    Re: Change Date Format

    That space at the end is actually the non-breaking space character, with a code of 160 rather than a normal space which has a code of 32. You can remove them all in a simple operation using Find & Replace.

    Select all your cells by doing CTRL-A or clicking on the intersection between the row and column identifiers.
    CTRL-H will bring up the F&R dialogue box:

    FIND What: ALT-0160
    Replace with: leave blank
    Click Replace All

    Where ALT-0160 means you should hold down the Alt key and type 0160 on the numeric keypad (or you could just copy one of those "spaces" into the box).

    Hope this helps.

    Pete

  8. #8
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: Change Date Format

    Quote Originally Posted by furstone23 View Post
    26 Mar 2016 to the actual date
    thanks for help,
    or try this... =--SUBSTITUTE(TRIM(SUBSTITUTE(A4,CHAR(160),""))," ","-")

  9. #9
    Registered User
    Join Date
    03-20-2016
    Location
    London
    MS-Off Ver
    10
    Posts
    8

    Re: Change Date Format

    Thank you very much guys, I fixed the issue.

    Thanks @Pete_UK this is the easiest way and it even transforms the date into its normal values. Cheers man!

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

    Re: Change Date Format

    You're welcome.

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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. Show Error when a cell with number format change to date format
    By delroba in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-08-2015, 02:57 AM
  2. [SOLVED] Date formula - Change Format to YYYYMMDD from Exported Format
    By haleakala17 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-21-2014, 03:22 PM
  3. [SOLVED] help on vba code to change the error date format as standard format mm/dd/yyyy
    By johnodys in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-13-2013, 01:10 AM
  4. Excel:How change the textbox format from text to date format?
    By inpetto in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-10-2013, 08:23 AM
  5. Macro to change date value from one date format to another date format
    By RG12 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2013, 04:51 AM
  6. Not able to change date format into proper excel date format
    By excel5111987 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2011, 08:19 AM
  7. Userform date format reverting back to us format on change event
    By jpruffle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-10-2009, 12:34 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