Reputation: 601
I have a content type which has a required field named field_deadline. How do I check if field_deadline of nodes of this content type is greater than current timestamp (deadline has not been met yet)?
Upvotes: 0
Views: 924
Reputation: 13321
if (strtotime($node->field_deadline['und'][0]['value']) > time()) {
// deadline has not been met yet.
}
Upvotes: 1