Share
Go down
sailatha
Posts : 6
Join date : 2011-06-25

selenium RC

on Sat Jun 25, 2011 7:53 pm
how to sort date using selenium rc
can any one help me
Arthur
Active particpant
Active particpant
Posts : 23
Join date : 2011-05-23
Location : Pune

Re: selenium RC

on Mon Jun 27, 2011 1:14 pm
Please give details such which language, how the sort must be, date format etc.


sailatha wrote:how to sort date using selenium rc
can any one help me
sailatha
Posts : 6
Join date : 2011-06-25

Re: selenium RC

on Thu Jun 30, 2011 12:15 am
Hi,

The language is JAVA. Sort can be Ascending or Descending and Date format should be MM/DD/YYYY.

Thanks in advance.
regards
Sailatha
Arthur
Active particpant
Active particpant
Posts : 23
Join date : 2011-05-23
Location : Pune

Re: selenium RC

on Thu Jun 30, 2011 5:57 pm
Hi,
You can use the following method:
1. convert the date into string
SimpleDateFormat dateformatMMDDYYYY = new SimpleDateFormat("MMddyyyy");
StringBuilder nowMMDDYYYY = new StringBuilder( dateformatMMDDYYYY.format( dateNow ) );

2.
split the things such as mm, dd, yyyy.

3. Use sort method (array.sort(sortNumber))

also you can see the site is it helpful to you
http://javascript.about.com/b/2010/04/02/date-array-sort.htm
http://javascript.about.com/library/blsort3.htm
http://javascript.internet.com/forms/date-sorter.html
Sponsored content

Re: selenium RC

Back to top
Permissions in this forum:
You cannot reply to topics in this forum