Skip to content
Prev 210932 / 398500 Next

Comparing two date columns

On Feb 21, 2010, at 2:19 PM, Newbie19_02 wrote:

            
We cannot tell from that output what data type you are working with.  
You may not be working with Dates at all. You also have not offered  
the code that is not working. If they are dates, then pmin should work  
well.

 > pmin(as.Date("2004-11-18"), as.Date("2000-11-02"))
[1] "2000-11-02"

Next time use dput to allow unambiguous communication. (The fact that  
you are not using either dput or dump suggests you have not yet spent  
enough effort at reading the Posting Guide.)