I'm trying to get the year, month, day and time isolated so I can then I can make it populate in a different format.
solar.txtimport java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; public class CSVDateandTime { public static void main(String [] args) { String fileName = "solar.all"; File file = new File(fileName); try { Scanner inputStream = new Scanner(file); while (inputStream.hasNext()){ String data = inputStream.next(); //gets a whole line String [] values = data.split(","); System.out.println(data + "***"); } } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }