You need to sign in to do that
Don't have an account?
sd2008
Question: Initial term of field expression must be a concrete SObject:Datetime
I got the message for the following code:
public class FirstClass
{
public Integer tm(){
Datetime mytime = datetime.now();
Integer h = mytime.hour;
return h;}
}
I also tried the following, but still not right.
public class FirstClass
{
public string tm(){
Datetime mytime = datetime.now();
string h = string.valueof(mytime.hour);
return h;}
}
hour is a method call and needs to have the () after it.
public class FirstClass { public Integer tm() { Datetime mytime = datetime.now(); Integer h = mytime.hour(); return h; } }
All Answers
hour is a method call and needs to have the () after it.
public class FirstClass { public Integer tm() { Datetime mytime = datetime.now(); Integer h = mytime.hour(); return h; } }