In column A, I have timestamp values. In a second column, I'd like to have a formula that would return words or strings like "early morning" or "Late afternoon", so that I may count and chart these responses. What formula am I looking for in Apple's Numbers?

  • 1
    It's a good idea to provide sample of your timestamp values. Commented Feb 11, 2016 at 15:06
  • Is it a UNIX timestamp? Or just the standard date and time from Numbers insert date? How are the timestamp values generated?
    – bjbk
    Commented Feb 11, 2016 at 21:03
  • So I'm generating these time stamps with a text expander snippet, which I imagine means that it is really being converted via Numbers' standard insert date. Commented Feb 11, 2016 at 21:13
  • 2/11/2016 12:00:00 AM Like that?
    – bjbk
    Commented Feb 11, 2016 at 21:13
  • @bjbk yes, that's right Commented Feb 12, 2016 at 0:03

1 Answer 1


Assuming you have a normal Numbers Date/Time 2/11/2016 12:00:00 AM, then a simple IF() statement can be used combined with the HOUR function.

=IF( HOUR ( A2 ) < 12, "Good Morning", "Good Afternoon")

To add more than just 2 options, nest your IF statement.

=IF(HOUR(A3) < 5,"Early",IF(HOUR(A3) < 12,"Morning",IF(HOUR(A3) < 17,"afternoon",IF(HOUR(A3) < 20,"evening","night"))))

Numbers will return the first TRUE value.

Formula Sample

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .