You need to sign in to do that
Don't have an account?
MicheleMcgeoy
day_in_week function gives error
I'm trying to assess if the day of week is Monday, but get the following error:
Method does not exist or incorrect signature: DAY_IN_WEEK(Date)
If (DAY_IN_WEEK(Camp.startdate) = 2) {
// do something
} else {
// do nothing
}
Any ideas?
Thanks, Michele
Michelle,
DAY_IN_WEEK is a date function in SOQL, but does not exist in Apex. I have a couple of methods that might help:
Note that dayOfWeek() returns 0 for Monday, which is different from the DAY_IN_WEEK() method in SOQL, which returns 2.
If this helps, please mark it as a solution, and give kudos (click on the star) if you think I deserve them. Thanks!
-Glyn