+ Reply to Thread
Results 1 to 6 of 6

Slice system date field and convert to US dates

  1. #1
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Slice system date field and convert to US dates

    Please see attached workbook.
    It contains a column in which I have system dates/times.
    The column is part of a bigger file but my question is only about this column.

    Its gives : Date (in european settings) Time AM/PM Timezone.
    But all in 1 cell!!

    What I want now is in the column next to it or wherever that the macro give the date for that line.

    Second thing is that the dates are in Dutch months.
    I would need it to give the US months.

    So instead of Mei it should give May, Mar instead of Mrt and Oct instead of Okt.

    A further nice to have would be that it then in another column give the correct weeknumber.
    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Slice system date field and convert to US dates

    What format do you want it in? 5/2/7? or 02-May-2017? Do you care about the time or just the dates?

    I can come up with a string that looks like the date format you want, and I can compute the date as a number, but your regional settings will turn them back to a European display.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Re: Slice system date field and convert to US dates

    Well dflak actually this how I now solved it :
    Please Login or Register  to view this content.
    But could be there are easier and quicker ways.
    As you see I did a text to column to isolate only the date part of the text string.
    After that still a few things were necessary to make it recognize the correct dates.

    ps: This is code from the bigger workbook so that is why the column letters don't add up with the sample book.

  4. #4
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Re: Slice system date field and convert to US dates

    Ok....turns out this solution is not working...

    Noticed now for example 10-3-2017 is showing as 3 October where it should be 10 March

    These dates settings are driving me crazy.

  5. #5
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Re: Slice system date field and convert to US dates

    Found that replacing first to american names works better than using the month numbers.

    Now this code makes the date field usable for further processing:
    Please Login or Register  to view this content.
    Think i will close the thread.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Slice system date field and convert to US dates

    Try
    Please Login or Register  to view this content.
    Don't worry about this, if you find the solution already.

+ 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. Replies: 3
    Last Post: 10-09-2016, 11:19 PM
  2. Replies: 4
    Last Post: 04-17-2015, 09:19 AM
  3. [SOLVED] Need to convert Pivot page field date format in drop down
    By taps in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-20-2013, 06:29 AM
  4. Module to convert field to a date format unsuccessful
    By ready2drum in forum Access Programming / VBA / Macros
    Replies: 9
    Last Post: 05-03-2010, 07:48 AM
  5. Replies: 3
    Last Post: 10-16-2008, 02:46 PM
  6. How to convert date field to number value
    By landj68 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 10-11-2005, 11:48 AM
  7. Convert 20050118 to a working date field
    By Jessica in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-23-2005, 07:06 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