How do you filter between times of day regardless of the day

Comments

2 comments

  • Official comment
    Saurabh Agashe

    You can also try the following filter as well:

    (ASDATE(FORMATDATE(#CallLogs.Call_Date;"HHmm");"HHmm") >= ASDATE("08:30";"HH:mm") && ASDATE(FORMATDATE(#CallLogs.Call_Date;"HHmm");"HHmm") <= ASDATE("17:30";"HH:mm"))
    
    Comment actions Permalink
  • Saurabh Agashe

    One way you could accomplish this would be to add the minutes to the already existing filter:

    HOUR(#CallLogs.Call_Date >= 8 && MINUTE(#CallLogs.Call_Date) >= 30 && HOUR() <= 16 && MINUTE(=#CallLogs.Call_Date) <= 30
    

    I received the following from another user confirming that this also works:

    ((HOUR(#CallLogs.Call_Date) > 8) && (HOUR(#CallLogs.Call_Date) < 17)) || ((HOUR(#CallLogs.Call_Date) == 8) && (MINUTE(#CallLogs.Call_Date) >= 30)) || ((HOUR(#CallLogs.Call_Date) == 17) && (MINUTE(#CallLogs.Call_Date) <= 30))
    
    0
    Comment actions Permalink

Please sign in to leave a comment.