5 Replies Latest reply on Aug 24, 2014 6:47 AM by Jan Pelousek

    Help with SWQL - Day of the week?

    Craig Norborg

      Ok, just starting off with SWQL and I am trying to replicate some of the things that have been done with report-writer in the past here.   One of the things is a report that gives availability for a group of sites during business hours (ie: M-F 8am-5pm).    Curious how this can be done?  I've got it to the point where I'm getting availability reports, and I'm getting them for between the hours of 8am to 5pm (I think).  But I'm stuck on how to get the Day-of-the-week (DOTW) done?

       

      Was hoping for a function that might return that, but I don't see any in the documentation I've been able to dig up.   I was thinking of using the DayDiff function to find the # of days since a given Monday lets say, and then wanted to mod it by 7 and figure out the DOTW based on the remainder, but I don't think SWQL has that kind of math ability?

       

      Anyone have any good ideas for getting this done?   Or am I SOL on getting it done with SWQL?  :-)