+ Reply to Thread
Results 1 to 10 of 10

How to convert Date and time format to only date in Column

  1. #1
    Forum Contributor prabhuduraraj09's Avatar
    Join Date
    05-19-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    330

    How to convert Date and time format to only date in Column

    Hi all,

    Need some help, how can i convert "Date and Time " format in a column to reflect only "Date". ( through VBA )

    eg, 11/23/2018 8:28:14 AM

    should get converted to

    11/23/2018

    Date and time format is available in "B" column, so i need code to convert this in to date in the specific column.
    Thank you

    If I have helped you in someway, use the * icon below to give reputation feedback, it is appreciated.

  2. #2
    Valued Forum Contributor PaulSP8's Avatar
    Join Date
    11-21-2017
    Location
    Chorley, England
    MS-Off Ver
    2013 & 2021
    Posts
    437

    Re: How to convert Date and time format to only date in Column

    If it's always going to be in mmddyyyy format then you can simply use;

    Please Login or Register  to view this content.
    If not, then look for the space;

    Please Login or Register  to view this content.
    Excel should automatically convert it to a date for you.

  3. #3
    Forum Contributor prabhuduraraj09's Avatar
    Join Date
    05-19-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    330

    Re: How to convert Date and time format to only date in Column

    Hi,

    This is just converting only for value in Cell "B1".

    But i have data in entire column B. sometime data will be from B2 to 200 or may be more or less.....

    i need this conversion to happen whatever the data available in B column.

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: How to convert Date and time format to only date in Column

    Try:

    Please Login or Register  to view this content.
    If you only want to change how it is displayed.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  5. #5
    Forum Contributor prabhuduraraj09's Avatar
    Join Date
    05-19-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    330

    Re: How to convert Date and time format to only date in Column

    Hi Arkadi,

    Not just displaying, I don't want those time in the cells.

    Just need to have only dates in the columns.

  6. #6
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: How to convert Date and time format to only date in Column

    Maybe:

    Please Login or Register  to view this content.

  7. #7
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: How to convert Date and time format to only date in Column

    Or, alternatively:

    Please Login or Register  to view this content.
    Last edited by XLent; 11-26-2018 at 02:28 PM. Reason: whoops - reinstated previously removed Parent reference

  8. #8
    Registered User
    Join Date
    02-14-2018
    Location
    Wisconsin, USA
    MS-Off Ver
    2016
    Posts
    35

    Re: How to convert Date and time format to only date in Column

    I had this same issue and rather than using a script I split the column by the number of digits in the time. In my case it was using a XX:XX:XXPM style time. I counted the digits and put the split after that. Worked like a charm.

  9. #9
    Valued Forum Contributor PaulSP8's Avatar
    Join Date
    11-21-2017
    Location
    Chorley, England
    MS-Off Ver
    2013 & 2021
    Posts
    437

    Re: How to convert Date and time format to only date in Column

    Quote Originally Posted by prabhuduraraj09 View Post
    This is just converting only for value in Cell "B1". But i have data in entire column B. sometime data will be from B2 to 200 or may be more or less.....
    But you never said that when you asked so I just assumed you'd be able to work with what I gave you.

    If there is only this format in Col B and no other data types then;

    Please Login or Register  to view this content.
    Quote Originally Posted by prabhuduraraj09 View Post
    i need this conversion to happen whatever the data available in B column.
    If there are other data types in Col B then please give an example of what they can look like.
    Last edited by PaulSP8; 11-26-2018 at 07:37 PM. Reason: Left the 1 and didn't replace with i :(

  10. #10
    Forum Contributor prabhuduraraj09's Avatar
    Join Date
    05-19-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    330

    Re: How to convert Date and time format to only date in Column

    Paul, Arkadi, Xlent

    Thanks to All of you guys for your contribution.
    Appreciate the effort and help.

+ 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. Convert Date & Time Format to just Date
    By rwmill in forum Excel General
    Replies: 3
    Last Post: 04-18-2017, 03:16 PM
  2. [SOLVED] convert date and time to different format
    By freddie1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-17-2017, 06:17 AM
  3. Convert Date and Time to Date - Format problems
    By eugbed in forum Excel General
    Replies: 5
    Last Post: 05-03-2015, 05:31 PM
  4. Convert a date/time format to a date format
    By LITTLETON in forum Excel General
    Replies: 2
    Last Post: 09-23-2013, 10:43 PM
  5. 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
  6. [SOLVED] How do I convert imported date/time data to date/time format?
    By andykent99 in forum Excel General
    Replies: 4
    Last Post: 01-03-2013, 07:47 AM
  7. Excel : Convert data in column to limited row (time and date format)
    By hooi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-01-2011, 07:21 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