+ Reply to Thread
Results 1 to 3 of 3

Macro to format date without time

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,714

    Macro to format date without time

    I have dates and time in Col D, that was imported from a csv file


    I have tried to write a macro to format the dates (dd/mm/yyyy) without the time using a macro but the time is not removed


    I have manually done so (sheet "Manual result") by first using text to columns and then formatting the dates


    It would be appreciated if someone can kindly assist me


    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,858

    Re: Macro to format date without time

    The quickest way is to use Power Query. Load the table/range to PQ. Change type to Date. Close and Load

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,714

    Re: Macro to format date without time

    Thanks Alan. It works perfectly

+ 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. [SOLVED] Converting Unusable Time / Date Format To Usable Time / Date Format
    By Gtrtim112 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-05-2019, 11:25 AM
  2. [SOLVED] Change time in text to date/time format with AM/PM converted to 24hr
    By iantix in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-14-2018, 06:13 AM
  3. [SOLVED] Converting Date & Time (General format) to Date (Date format)
    By supremenuts in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2017, 12:55 PM
  4. modify date time cell to an excel format date time
    By rileyp in forum Excel General
    Replies: 12
    Last Post: 03-24-2013, 08:39 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. Remove time from a date and time field? Format removes the displa.
    By oaoboc in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-16-2005, 03:35 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