Skip to main content
Gunjan Garg a posé une question dans #SOQL Query

Opportunity object does not have close month, it has close date. So, how can i query it and fetch the record from Salseforce database. I am executing this query inside opportunity trigger.

  #trigger    #SOQL Query

Any help will be appriciated.

4 réponses
  1. 7 sept. 2021, 12:26

    Hi Gunjan,

     

    Could you please use this query,

     

    select count(id) from Opportunity where CALENDAR_MONTH(CloseDate) = 9 AND StageName ='Closed Won'
0/9000