+ Reply to Thread
Results 1 to 11 of 11

Removing decimals after date and time

  1. #1
    Registered User
    Join Date
    04-14-2023
    Location
    Denmark
    MS-Off Ver
    10
    Posts
    4

    Removing decimals after date and time

    Hi all

    I got a datasheet, where I have the date under ''SyrningStart'' with "dd-mm-yy hh-mm-ss", BUT in the datasheet they have a . after the seconds so I can't handle it as date our anything.

    I is set as date, but is not behaving like date. The first row, I deleted the numbers after . and then it changes to the date.

    How can I remove the . without deleting manually for 10.000 rows?

    I have attached the attached a picture and the file
    Sk?rmbillede 2023-04-14 205140.png

    Hope you can help :-D Time not working.xlsx
    Last edited by TrineBjorg; 04-14-2023 at 03:06 PM.

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Removing decimals after date and time

    change formatting to YYYY-MM-DD HH:MMM:SS without .0 at the end
    but check if your dates are real dates not text
    eg. =ISTEXT(G3)
    Last edited by sandy666; 04-14-2023 at 03:01 PM.

  3. #3
    Registered User
    Join Date
    04-14-2023
    Location
    Denmark
    MS-Off Ver
    10
    Posts
    4

    Re: Removing decimals after date and time

    I can't change it, that is the problem :-)

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Removing decimals after date and time

    did you check it for text ?

  5. #5
    Registered User
    Join Date
    04-14-2023
    Location
    Denmark
    MS-Off Ver
    10
    Posts
    4

    Re: Removing decimals after date and time

    It is text, if I'm not deleting the .xxx
    Attachment 825771

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Removing decimals after date and time

    if this is a text you cannot reformat this
    select your dates range and
    try to use Data tab - Text to Columns - Next, Next , choose Date (DMY or whatever you want) , Finish

    btw. your attachment is added incorrectly

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Removing decimals after date and time

    for future
    how to add excel file properly

    hta.png

  8. #8
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Removing decimals after date and time

    I executed a simple text to columns on the entire column, and converted the date/time stored as text to date/time serial numbers, while retaining the fractional second information:

    1) Select data A4:A10409
    2) Date -> Text to columns
    2a) Delimited or Fixed width, doesn't matter which, since there is only one column in the result.
    2b) At step three of the text to columns wizard, select the "Date" radio button and specify YMD dates. I also specified to have the result output to D4 so that I could compare the parsed data to the original.
    3) My copy of Excel defaulted to a mm:ss.0 number format, so I then formatted the column (column D, since I did not overwrite the original) as "yyyy-mm-dd hh:mm:ss.000"
    4) Test and evaluate the result. My spot checks indicated an accurate conversion from text to number.

    Using text to columns as a strategy for converting numbers stored as text to numbers is described here: https://support.microsoft.com/en-us/...rs=en-us&ad=us

    Does that work for you?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  9. #9
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Removing decimals after date and time

    check this one
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    04-14-2023
    Location
    Denmark
    MS-Off Ver
    10
    Posts
    4

    Re: Removing decimals after date and time

    Hi Sandy

    Nice, how did you do that! :-D Because I have to change more dates.

  11. #11
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Removing decimals after date and time

    re-read post#6 or #8

+ 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] Date and time format decimals
    By junada0 in forum Excel General
    Replies: 5
    Last Post: 02-25-2015, 06:42 PM
  2. [SOLVED] Removing time in date+time with SUMIF
    By bigmantitus in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-24-2014, 11:48 AM
  3. Replies: 4
    Last Post: 04-30-2014, 12:42 PM
  4. [SOLVED] Removing decimals from numbers
    By dugumr in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-18-2013, 08:17 AM
  5. Removing Time From Date
    By treeantz in forum Excel General
    Replies: 8
    Last Post: 12-08-2011, 03:39 AM
  6. Removing time from date/time data - Excel 2010
    By Huzzah in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-04-2011, 12:03 PM
  7. Removing decimals in a variable
    By mrJulius in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-03-2007, 08:46 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