+ Reply to Thread
Results 1 to 5 of 5

Real Timestamp and convert to workshift via an IF statement or other

  1. #1
    Registered User
    Join Date
    01-23-2013
    Location
    Kansas City, MO
    MS-Off Ver
    Excel 2010
    Posts
    10

    Question Real Timestamp and convert to workshift via an IF statement or other

    Hello all... I have a report where each event entry has a timestamp in the following format: 10/21/2016 13:25

    I would like to read this timestamp and display a value in another column displaying the work shift when the action was performed as indicated by the timestamp. We work 24x7 and day shift runs from 7am to 3pm; Evening Shift runs from 3:01pm to 11pm and Night Shift runs from 11:01pm to 6:59am.

    I had written the following statement thinking that it would only read the time of day portion of the timestamp standard listed above but my logic was faulty.

    =IF(HOUR(E16269)<7,"NIGHT",IF(HOUR(E16269)<15,"DAY",IF(HOUR(E16269)<23,"EVENING")))

    I haven't figured out how to accomplish this to date. Any help, synergy you can offer would be greatly appreciated.

    Thanks for your consideration.

    Tony

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Real Timestamp and convert to workshift via an IF statement or other

    Hi,

    One way with the date & time in A1

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    01-23-2013
    Location
    Kansas City, MO
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Real Timestamp and convert to workshift via an IF statement or other

    This was absolutely perfect for my need. Thank you for the assistance with this, Richard! I have clicked on the Add Reputation icon for you. Many thanks again...

    Best,
    Tony

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Real Timestamp and convert to workshift via an IF statement or other

    Quote Originally Posted by tonytorero View Post
    This was absolutely perfect for my need. Thank you for the assistance with this, Richard! I have clicked on the Add Reputation icon for you. Many thanks again...

    Best,
    Tony
    That's most kind of you Tony. It was my pleasure.

    Now Y'all have a good day - or is it only Texans who say that?

  5. #5
    Registered User
    Join Date
    01-23-2013
    Location
    Kansas City, MO
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Real Timestamp and convert to workshift via an IF statement or other

    Quote Originally Posted by Richard Buttrey View Post
    Now Y'all have a good day - or is it only Texans who say that?
    LOL... While the phrase 'y'all' can be heard up here, north of Texas, it's not too common in the middle of the country. That being said, I can think of a family member or two who may take issue with that statement... Let's put it this way, you won't hear me say it often... if ever!

    However, we will say, "Have a good one." in the same manner! So, with no further ado... Have a good one!

+ 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] Convert timestamp
    By Melissa Camp in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-10-2016, 04:57 PM
  2. [SOLVED] find and convert unix Timestamp
    By tuspilica in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-01-2016, 06:02 PM
  3. Convert Timestamp to date.
    By brent_milne in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-09-2015, 01:31 PM
  4. Convert timestamp to date
    By brent_milne in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-29-2015, 10:02 PM
  5. [SOLVED] VBA - Convert Date/Timestamp into American Date and Military Timestamp
    By ryanmorris in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-01-2015, 03:43 PM
  6. Convert Timestamp vaule to date
    By dpatel in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-23-2010, 06:47 AM
  7. If/then Statement + timestamp
    By serpent333 in forum Excel General
    Replies: 3
    Last Post: 12-11-2007, 04:50 PM

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