Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

selenium RC

View previous topic View next topic Go down

selenium RC

Post by sailatha on Sat Jun 25, 2011 7:53 pm

how to sort date using selenium rc
can any one help me

sailatha

Posts : 6
Join date : 2011-06-25

Back to top Go down

Re: selenium RC

Post by Arthur 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

Arthur
Active particpant
Active particpant

Posts : 23
Join date : 2011-05-23
Location : Pune

Back to top Go down

Re: selenium RC

Post by sailatha 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

sailatha

Posts : 6
Join date : 2011-06-25

Back to top Go down

Re: selenium RC

Post by Arthur 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

Arthur
Active particpant
Active particpant

Posts : 23
Join date : 2011-05-23
Location : Pune

Back to top Go down

Re: selenium RC

Post by Sponsored content Today at 6:35 pm


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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