function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
111111 

CreatedDate >= Datetime.valueOf(sagyomotoCdJi) Error: unexpected token:

public sagyosaki__c[] selectSagyosaki07(String syoriTuubann,String sagyomotoCd,String sagyomotoCdJi,String state){
         

        sagyosaki__c[] sagyosakiList = null;
    

        sagyosakiList = [select ID from sagyosaki__c
            where sagyomoto_cd__c =:sagyomotoCd  and CreatedDate >= Datetime.valueOf(sagyomotoCdJi) and state__c =:state for update];
        
        return sagyosakiList;
    }
 
how can i get the date (  CreatedDate >= Datetime.valueOf(sagyomotoCdJi)  )?
 
CreatedDate >= Datetime.valueOf(sagyomotoCdJi)  is error?
 
 
111111
type is DateTime,how can i make (DateTime1 >= DateTime2) is no error?
SuperfellSuperfell
sagyosakiList = [select ID from sagyosaki__c
where sagyomoto_cd__c =:sagyomotoCd and CreatedDate >= : Datetime.valueOf(sagyomotoCdJi) and state__c =:state for update];


note the : to bind in the apex value.

Message Edited by SimonF on 07-01-2008 08:38 AM
111111
thank you for your help