+ Reply to Thread
Results 1 to 13 of 13

excel remove time from date

  1. #1
    Registered User
    Join Date
    04-14-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    127

    excel remove time from date

    Hi everyone,

    I have a column which has date/time stamp in following manner

    6/15/2015 12:35:12 PM

    I need to keep the date & remove time from the cells. I have been google & tried all sort of formatting with Month, Day & Year formula but it is giving me a #Value! error.

    Thanks in advance for any help.

    Regards,
    Vikas

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,067

    Re: excel remove time from date

    =MOD(A1,1) and format as time??
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: Lá fhéile Pádraig sona dhaoibh

  3. #3
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: excel remove time from date

    assume you are using DD-MM-YYYY

    you need to convert the date to your own convention

    easiest way i found is just text to column split it using space as delimiter
    while there change the date format to your country specific format
    Last edited by humdingaling; 06-15-2015 at 04:02 AM.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: excel remove time from date

    =int(a1)
    try the above formula
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,067

    Re: excel remove time from date

    Ha Ha. I misread this completely. I would swear that I read "keep the time and lose the date. Never mind, nflsales is spot on!!

  6. #6
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: excel remove time from date

    int would work if your date format is MM-DD-YYYY
    it doesn't work in Australia

    i thought India uses DD-MM-YYYY as well, whereby month 15 would give error?

  7. #7
    Registered User
    Join Date
    02-14-2015
    Location
    india
    MS-Off Ver
    office 2010
    Posts
    5

    Re: excel remove time from date

    May be ,the format of the cell where the Text"6/15/2015 12:35:12 PM" appears is formatted into custom field.Try changing the format to "short date or long date" in the format cell in home page.

  8. #8
    Registered User
    Join Date
    08-04-2009
    Location
    Golborne England
    MS-Off Ver
    2013
    Posts
    85

    Re: excel remove time from date

    Assuming that the source cell is text and not a date I tried this and was able to get a date value.

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    08-04-2009
    Location
    Golborne England
    MS-Off Ver
    2013
    Posts
    85

    Re: excel remove time from date

    Sorry I forgot to add a text() function to the first MID() to guarantee that the day is 2 characters long. Being in the UK my date format is DD/MM/YYYY and this works to that. If this does not give the desired result swap the first Mid() with the Left() function as below.

    DD/MM/YYYY

    Please Login or Register  to view this content.

    MM/DD/YYYY

    Please Login or Register  to view this content.
    I hope this isn't too confusing.

  10. #10
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: excel remove time from date

    This is a much simpler way of converting dates
    http://projectwoman.com/2011/03/exce...dy-to-dmy.html
    and because you are already using text to column you can split with either fixed width or space delimiter while your there
    if you really dont want to delete the excess columns you can skip import while your doing text to column

    you dont have to remember the formula and copy it from other sheets etc

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

    Re: excel remove time from date

    INT will work no matter what the date format is, provided you have 'real' dates.
    If posting code please use code tags, see here.

  12. #12
    Registered User
    Join Date
    08-16-2013
    Location
    Alb, NM
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: excel remove time from date

    This is an old thread, and my first post, but I recently found out about the =Int() function and well, combined with this VBA its so sleek it hurts. Inserts column and formula then removes old data. Check your headers and columns for special preferences, but I'm a noob and I was even able to tweak this to my special needs. HAVE FUN!

    Dim LR As Long

    Columns("j:j").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Range("j1") = "Date of Adjustment"

    LR = Range("A" & Rows.Count).End(xlUp).Row
    With Range("j2:j" & LR)
    .FormulaR1C1 = "=INT(RC[-1])"
    .NumberFormat = "mm/dd/yyyy"
    .Value = .Value
    End With

    Columns("i:i").Delete Shift:=xlToLeft

  13. #13
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: excel remove time from date

    If the date and time are in A1

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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. 2003 Excel remove the time and keep the date
    By cyruschan in forum Excel Formulas & Functions
    Replies: 30
    Last Post: 12-23-2014, 07:02 PM
  2. [SOLVED] Remove time from date macro
    By jockey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-14-2012, 06:41 AM
  3. Remove Time on Date/Time Stamp
    By pinoydarv in forum Excel General
    Replies: 8
    Last Post: 11-02-2011, 08:47 AM
  4. Replies: 3
    Last Post: 04-22-2009, 11:49 AM
  5. 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