Reputation: 2061
I'm trying to use DateTime for the first time.
I'm working with Java on IntelliJ.
I've tried writing:
DateTime dt = new DateTime();
but I get a "Cannot resolve symbol DateTime" error.
What should I do?
Upvotes: 2
Views: 12493
Reputation: 9733
You should import this class, add the following line in the beginning:
import org.joda.time.DateTime;
Note also that JodaTime library should be somehow available to your code, either manually connected as a jar or linked through Maven or other dependency management tool.
Upvotes: 5