Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm trying to compare a date by using =if([Modified]<DATE(2012,2,8),"Outdated","Updated") and it works just fine, but I have a problem with trying to add time to the comparison.

What I need is to compare an exact date and time. i.e. =if([Modified]<"2/8/2012 10:30:30 a.m.","Outdated","Updated") but don't know how to make it work. If the Item was last modified date&time less than 10:30:30 a.m. should be displayed as Oudated.

share|improve this question
    
Hi, I'm trying to compare a date by using =if([Modified]<DATE(2012,2,8),"Outdated","Updated") and it works just fine but I got the problem when trying to add time to the comparison. What I need is to compare an exact date and time. i.e. =if([Modified]<"2/8/2012 10:30:30 a.m.","Outdated","Updated") but don't know how to make it work. if the Item was last modified date&time less than 10:30:30 a.m. should be displayed as Oudated. –  Eloy Alfaro Jun 14 '12 at 15:44
add comment

1 Answer

up vote 2 down vote accepted

Try

=IF([Modified<(DATE(2012,2,8)+TIME(10,30,30)),"Outdated","Updated")
share|improve this answer
    
It worked just fine, thanks a lot. –  Eloy Alfaro Jun 14 '12 at 16:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.