how to create a calculated field to determine weekdays from weekends

Corey Humphrey shared this question 6 years ago
Answered
Best Answer
photo

Glad to hear it and no problem!

Nathan

Replies (5)

photo
1

Hi Corey,

I would recommend something along the lines of the following free-hand SQL:

CASE WHEN DAYOFWEEK(my_date) IN (1,7) THEN "WEEKEND" ELSE "WEEKEDAY" END

Let me know if this makes sense!

Regards,

Nathan

photo
1

Thank you Nathan,

I will have to get back with you, I keep getting timed out when trying to run the calculation on my report. there may be an issue with my system. but before what I tried was creating a Pre-defined filed called "Day of week" and used the Week Day name field and the value was the submit date field so the days of week would actually say the days of the week, then I created a simple calculated field that is doing pretty much what you are telling me to do. but for some reason that did not work.

photo
1

Hi Corey,

Sounds good, let me know if it starts working.

photo
1

it is working now, I guess there was just something wrong with my system.

Thank You!

photo
1

Glad to hear it and no problem!

Nathan

Leave a Comment
 
Attach a file