+ Reply to Thread
Results 1 to 7 of 7

Produced consistent dates from mix of single and double digit entries?

  1. #1
    Registered User
    Join Date
    06-07-2022
    Location
    NH, USA
    MS-Off Ver
    365
    Posts
    3

    Produced consistent dates from mix of single and double digit entries?

    Hello,

    EDIT - The issue I was having is due to the import step of tab/comma-delimited data. I imported all columns as general and thus the zeroes in many dates were removed. Changing this option during the import wizard (page after selecting your delimiter type) to "text" rather than "general" imported the DDMMYY values correctly.

    I am attempting to produce a time series of different measurements and subsequently import to other software that requires specific date formats.

    The timeseries data I have has a mix of single digit and double-digit month values (DDMMYY, DMMYY, DDMYY, DMYY)

    Example
    120288 reads correctly as 12/02/88
    10889 reads as 10/88/89
    22889 reads as 22/88/89

    While the YY dates are always fine, I'm unsure on how to read values to another cell as the month values will have a different position within the cell depending on the date. I guess a complex IF function could sort it out, but I'm not sure of how to do so, having read a few similar problems.

    Any help or links to solutions would be appreciates while I continue searching.

    Best wishes

    K
    Last edited by kfcurr; 06-08-2022 at 08:58 AM.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Produced consistent dates from mix of single and double digit entries?

    If you had one that was 21288, how would you know if that was 21st Feb or 2nd December?

    BSB

  3. #3
    Registered User
    Join Date
    06-07-2022
    Location
    NH, USA
    MS-Off Ver
    365
    Posts
    3

    Re: Produced consistent dates from mix of single and double digit entries?

    That's a great point; I will check to see if any instances have a 0 inserted, I expect not. It may be a layover of the output I'm using being generated from a NetCDF file that has separate numerical columns for each D M Y

    Edit: Using a NetCDF viewer day, month and year are separate columns and the online data portal I've used to get .csv of the data has merged the three with these frustrating results. I think exporting the columns individually from the NetCDF, correcting to two-digit dates then combining them would be simplest.
    Last edited by kfcurr; 06-07-2022 at 07:33 AM.

  4. #4
    Registered User
    Join Date
    07-10-2021
    Location
    GENEVA
    MS-Off Ver
    EXCEL FOR MAC MICROSOFT 365
    Posts
    80

    Re: Produced consistent dates from mix of single and double digit entries?

    Answer:
    1) Parse your day, month and year into different columns
    2) In a new column combine the day month and year into the dd/mm/yyyy format using &"/"& between each number. It will now look like a date.
    3) In a new column add zero to each of the date-like entries above. This will produce actual dates that you can format according to your preferred date format.

    See the picture below which shows how I did it.

    Screenshot 2022-06-07 at 15.48.52.png

    You may have to adapt the formula if you don't use European style dates, or if you don't use "/" as your date separator.
    Attached Files Attached Files
    Last edited by TRICKYT57; 06-07-2022 at 10:23 AM.

  5. #5
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Produced consistent dates from mix of single and double digit entries?

    @TRICKYT57 - That still won't get around the issue mentioned in post #2.

    BSB

  6. #6
    Registered User
    Join Date
    07-10-2021
    Location
    GENEVA
    MS-Off Ver
    EXCEL FOR MAC MICROSOFT 365
    Posts
    80

    Re: Produced consistent dates from mix of single and double digit entries?

    Quote Originally Posted by BadlySpelledBuoy View Post
    @TRICKYT57 - That still won't get around the issue mentioned in post #2.

    BSB
    Obviously, not, but as the OP explains in Post 3, he has found a way to solve that issue.
    I think exporting the columns individually from the NetCDF, correcting to two-digit dates then combining them would be simplest.

  7. #7
    Registered User
    Join Date
    06-07-2022
    Location
    NH, USA
    MS-Off Ver
    365
    Posts
    3

    Re: Produced consistent dates from mix of single and double digit entries?

    Thank you, this works perfectly and saves me a bunch of time extracting individual columns for each dataset. I can check the whole dates column for outliers and fix them as needed (all dates are in sequence, so easy to establish which month they should be)

+ 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] How to subtract single cells with double digits into a single digit of a single cell.
    By greenfox74 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-11-2021, 02:05 AM
  2. [SOLVED] Single digit and double digit numbers sequence within a cell
    By chintamani.avinash in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-03-2020, 02:39 PM
  3. Google Sheets: Sum each digit in Cell to Double and Single Digit
    By rbhapkar in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 11
    Last Post: 12-27-2019, 08:41 AM
  4. Google Sheets: Sum each digit in Cell to Double and Single Digit
    By rbhapkar in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-24-2019, 01:47 AM
  5. [SOLVED] Macro Recognizes Single Digit Month (ex: Jun = 6) But Not Double Digit Month (Nov = 11) ??
    By Logit in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-19-2019, 04:04 PM
  6. [SOLVED] Macro to convert WBS single digit numbers to double digit numbers
    By LeanAccountant in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 06-09-2018, 05:25 AM
  7. [SOLVED] Single cell - double digit subtraction???
    By greenfox74 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-09-2012, 12:30 AM

Tags for this Thread

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