+ Reply to Thread
Results 1 to 6 of 6

Changing a date and time to named day, date and rounded down hour

  1. #1
    Registered User
    Join Date
    09-29-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    73

    Changing a date and time to named day, date and rounded down hour

    Hi there

    I want to convert a date and time in cell A2 in dd/mm/yyyy hh:mm format to the following:

    B2 - Day - i.e. Monday, Tuesday etc
    C2 - Date in two digitals - i.e. 10
    D2 - Month is two digitals - i.e. 10
    E2 - Hour in two digits rounded down - i.e. 11 for 11:38

    The columns need to have numerical digits and not date and time converted to just show day etc.

    See attached sheet.

    Many thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Changing a date and time to named day, date and rounded down hour

    Try

    B2: =TEXT(A2,"dddd")
    C2: =DAY(A2)
    D2: =MONTH(A2)
    E2: =HOUR(A2)

    Hope that helps.

  3. #3
    Registered User
    Join Date
    09-29-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    73

    Re: Changing a date and time to named day, date and rounded down hour

    Thanks Jonmo1. Super quick response. All works well. Only one slight problem. If column A is blank, column B returns a date of Saturday. Any ideas?

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Changing a date and time to named day, date and rounded down hour

    Try

    =IF(A2>0,TEXT(A2,"dddd"),0)

  5. #5
    Registered User
    Join Date
    09-29-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    73

    Re: Changing a date and time to named day, date and rounded down hour

    Brilliant. Tweaked it slightly to return nothing =IF(A2>0,TEXT(A2,"dddd"),"").

    Thanks so much.

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Changing a date and time to named day, date and rounded down hour

    Great, glad to help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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