Here's one way of doing it that would work for the example you gave: t1 = Time.parse(Time.parse("September 13, 2010 5:54:32 PM").strftime("%B %d, %Y")) t2 = Time.parse('09/13/2010') t1 == t2 =>true
----- Original Message ---- From: sivam <sivamma...@gmail.com> To: Watir General <watir-general@googlegroups.com> Sent: Thu, September 16, 2010 3:00:34 AM Subject: [wtr-general] Date Functions Do we have any date function to convert string to date format like mm/ dd/yy Actually my string is "September 13, 2010 5:54:32 PM". I need to compare this string with 09/13/2010. Could please help onto this. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com