Skip to Content
0
Apr 14, 2014 at 11:09 AM

CASE Formula Based On Time

27 Views

I have a DateTime field that I need to create a CASE statement for based on the time value -

I tried:

Select TIMEVALUE({DateTimeField})

CASE BETWEEN ["12,00,00 AM" AND "12,30,00 AM"] :

1;

Also tried:

Select TIMEVALUE({DateTimeField})

CASE "12:00:00 AM" TO "12:30:00 AM" :

1;

Also tried with no space before the AM, and with the values in parens (A TO B). Also tried just using TIME, as opposed to TIMEVALUE.

While I think the 2nd is closer to what it should be, I get the error that "A time range is require here", with everything after the CASE highlighted.

This goes along with a question I posted friday, which, while an answer was attempted, was not resolved. This would be the LONG way of resolving that issue.

Thanks for any assistance!