+ Reply to Thread
Results 1 to 4 of 4

Date format

  1. #1
    Registered User
    Join Date
    05-05-2015
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    1

    Date format

    Hi,


    I'm getting a date out of a macro with format 04/05/2015.
    I need to have as output 04052015.
    Therefore, I've split text to columns which gives me three columns containing a "4", a "5" and a "2015".
    I've concatenated these three columns, which gives me 452015. But I need 04052015...


    Can someone give some advice ?

    Already a big thank you !

    Xavier

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Date format

    Can't you use Format?
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Date format

    Hi XavierVM and welcome to ExcelForum,

    Try something like the following code:
    Please Login or Register  to view this content.
    To prevent typos from ruining days and weeks of work 'Option Explicit' is NEEDED at the top of each code module. This prevents errors caused by missspellings and FORCES every variable to be DECLARED (e.g. Dim i as Integer). http://www.cpearson.com/excel/DeclaringVariables.aspx

    Lewis

  4. #4
    Valued Forum Contributor mahju's Avatar
    Join Date
    11-27-2010
    Location
    Pakistan, Faisalabad
    MS-Off Ver
    Excel 2010 plus
    Posts
    730

    Re: Date format

    Try

    Please Login or Register  to view this content.
    Mark the thread as solved if you are satisfied with the answer.


    In your first post under the thread tools.

    Mahju

+ 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. Converting from the 1904 date format to the 1900 date format without losing data
    By Patty McJorst in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-01-2020, 12:53 PM
  2. Replies: 4
    Last Post: 04-29-2015, 08:36 AM
  3. Date Format Of User PC Changes Display format date of Excel File after update
    By waihar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-24-2014, 03:09 AM
  4. Replies: 5
    Last Post: 02-08-2013, 11:06 AM
  5. Need Formula/VBA Code to convert date in String Format to Normal Date format
    By Karthik Sen in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-18-2012, 04:54 AM

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