 Good morning all!

Just wanted to confirm - how do I compare two date-time stamps in the
following format?

I tried the following and they seem to work fine...

But I am not so sure whether these comparisons are treated as char strings
and based on alphabetic ordering, or actually R is smart enough to
auto-recognize these strings and compare based on calendar ordering?

Or maybe calendar ordering is coincidental with alphabetic ordering? I am
trying to conceive a counter-example...


To make it absolutely correct, maybe I should use


strptime(date-time-stamp1, "%Y-%m-%d %H:%M:%OS")

vs.

strptime(date-time-stamp2, "%Y-%m-%d %H:%M:%OS")

? Will that be definitely correct?

Thanks a lot!

> "2011-09-20 12:01:33.386168"< "2011-09-20 12:01:33.386169"

[1] TRUE

> "2011-09-20 12:01:33.386168"< "2012-09-20 12:01:32.386169"

[1] TRUE

	[[alternative HTML version deleted]]

