![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I was strucked in a problem, basically I'm working on Sortable Table and the table is created using HTML Tags and one of the fields in the table contain Date in unix format (something like Tue Sep 02 01:00:00 2003). I wrote the script using DOM. I collected innerHTML of a particular cell and checked whether it a string or not (using isNaN) |
|
and based on that I sorted the rows based on a column. Coming to this date field my sort technique is not working becauce it treats the cell value as a string and sorts the table based string sorting. Can any one help me in this regard. |
#3
| |||
| |||
|
|
Hi, I was strucked in a problem, basically I'm working on Sortable Table and the table is created using HTML Tags and one of the fields in the table contain Date in unix format (something like Tue Sep 02 01:00:00 2003). I wrote the script using DOM. I collected innerHTML of a particular cell and checked whether it a string or not (using isNaN) and based on that I sorted the rows based on a column. Coming to this date field my sort technique is not working becauce it treats the cell value as a string and sorts the table based string sorting. Can any one help me in this regard. Thanks in advance Have a look at the following link: |
#4
| |||
| |||
|
|
Raghuram Banda <raghuram.banda (AT) nokia (DOT) sify.net> writes: and the table is created using HTML Tags and one of the fields in the table contain Date in unix format (something like Tue Sep 02 01:00:00 2003). ... ... Should the above become 20030902 (optionally adding 010000 for the time, as a direct coding of the date)? Or 1062457200000 (the value of the corresponding Date object in local time)? |
|
Or 1062464400000 (the value if it is UTC time)? The obvious answer to your question is: Recognize it as a date and treat it as such. |
![]() |
| Thread Tools | |
| Display Modes | |
| |