我有一個排列日期。我想知道有多少個工作日在該陣列中。那麼,如何能做到這一點用java ..如何查找排列的工作日數
*here i read lines from csv file & put those into values. *values[2] contain the dates of that csv file. *So now i want to find number of weekdays in values[2].
FileInputStream fis=new FileInputStream("c:/sample.csv");
InputStreamReader isr=new InputStreamReader(fis);
BufferedReader bf = new BufferedReader(isr);
while (bf.ready()) {
String line = bf.readLine();
String[] values=line.split(",");
String date=values[2];
}
這裏是我的csv文件
11/1/2010,jhone
11/3/2010,alex
11/6/2010,jhone
11/2/2010,neil
11/20/2010,neil
11/15/2010,jhone
我的格式是MM/d/yyyy – Chamal 2011-01-07 07:02:15
你可以發一下你的CSV文件 – 2011-01-07 07:16:33