Forum Discussion
Rob Nunley
Apr 06, 2020Brass Contributor
Time and Yes/No
I have a Date/Time Field named "Submitted" in format mm/dd/yyyy hh:mm. I have another calculated field named "HelperTime" with the following formula:
=TEXT(Submitted-DATE(YEAR(Submitted),MONTH(Submitted),DAY(Submitted)),"hh:mm")
This gives me just the time from the "Submitted" field. I would like to have a calculated Yes/No field that would return the value "yes" if "HelperTime" is greater that 14:00 and "no" otherwise. I am using the following formula but it is not working:
=IF(HelperTime>14,"Yes","No")
If i use 14:00 in above formula it get an error message.
- DhaniColeBrass Contributor
Looks like you helper time is a text string, so you need to convert it to time. Try:
=IF(TIME(LEFT(Helpertime,2),RIGHT(Helpertime,2),0)>TIME(14,0,0),"Yes","No")