+ Reply to Thread
Results 1 to 7 of 7

Convert custom Date into Date format

Hybrid View

  1. #1
    Registered User
    Join Date
    04-16-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Convert custom Date into Date format

    Hi all

    I have dates in the following format: 22.5.08

    I am trying to convert these into the dd/m/yy format but when I try and format the cells using a custom format (right click > Format Cells > Date) it does not convert the 22.5.08 into the desired format.

    I have also tried using the dateformat function.

    Anu suggestions would be appreciated.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Convert custom Date into Date format

    They are probably imported dates & are text not numerical
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Convert custom Date into Date format

    ..and following Roy's post you can check whether they are numbers with the =ISNUMBER(A1) function which should return true if the cell ref is a number.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    04-16-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Convert custom Date into Date format

    Thanks for the response - in that case the only solution would be to remove the "." from the value and then apply the date format to the values?

    I hope that make sense? If is there an easy way of removing the "."?

    Thanks again

  5. #5
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Convert custom Date into Date format

    Just do a find...replace changing . to / and they should convert to serial dates.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,702

    Re: Convert custom Date into Date format

    Try using "Text to columns"

    Select column of dates

    Data > text to columns > Next > Next > under "column data format" select "Date" and "DMY" > Finish
    Audere est facere

  7. #7
    Registered User
    Join Date
    04-16-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Convert custom Date into Date format

    Thanks for all the suggestions. The easy fix was the text to columns approach and the other option was to do the following as suggested by others:

    Use a substitute function on the data e.g. =substitute(22.01.2011,".","/") and then to do a dateValue on the result.

    Thanks again

+ 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