Displaying 2 results from an estimated 2 matches for "datesplit".
2010 Oct 28
4
Alter character attribute
...06 0:00:00"))
#Create lists to store month and year results
Data.Month_<-list()
Data.Year_<-list()
#pull out year/month attribute at put in own column
for(i in 1:length(RawData2..$ID)){
#Select Record
Data.X<-RawData..[i,]
#Separate date into month, day, and year
DateSplit<-strsplit(Data.X$period_end_date,"/")
#Select month
Month<-unlist(DateSplit)[1]
#Separate year from time attribute
Year.X<-strsplit(unlist(DateSplit)[3]," ")
Year.Y<-unlist(Year.X)[1]
Data.Month_[[i]]<-Month
Data.Year_[[i]]<-Y...
2005 Sep 14
13
table sorting/manipulation library?
...t;number</th><th>date</th></tr></thead>
<tfoot />
<tbody>
..........
</tbody>
</table>
<script type="text/javascript">
document.getElementById(''myTable'').sorterFuncs = [
String,
Number,
function(str) {
var dateSplit = str.split(/\D/);
//assume we''re in MM/DD/YYYY format
return (dateSplit[2] * 10000)
+ (dateSplit[0] * 100)
+ (str[1] * 1);
}
];
</script>
----------------------
That''s it. Our table now correctly sorts by clicking on the table headers.
If you want, add &quo...