From: Steven A. <ste...@gm...> - 2011-06-22 14:54:18
|
Hi, I am trying to parse some modified dates of files but I am running into a few problems. Below is the structure I have used to parse the date string from an FTP callback to a Date type in order to compare it with a file on the device: class FileWithDate { public final String fileName; public final Date fileDate; public FileWithDate(String fileName, String fileDate){ Date parsedDate = null; try { DateFormat formatter = new SimpleDateFormat("MMM dd HH:mm"); parsedDate = (Date)formatter.parse(fileDate); } catch (Exception e) { Logging.Error(e); } this.fileName = fileName; this.fileDate = parsedDate; } } Is there anything in the NSDate type I can use to parse a string to a date? Whenever I try to compile the code above on XCode it fails to build as it can't find the files. I guess this has not been written yet? Would be greatful for any help :) Steve |