On Mon, 30 Jun 2014, Sven Schreiber wrote: > Am 29.06.2014 20:22, schrieb Allin Cottrell: >> On Sat, 28 Jun 2014, Sven Schreiber wrote: >> >>> I keep running into situations where gretl doesn't recognize the dates >>> in my csv files. Now instead of asking for more heuristics and >>> cleverness, I'm wondering whether it would be possible for the user to >>> specify the format pattern at the time of opening/importing the file. >>> E.g. let the user specify the string "yyyy~mm" to denote monthly data >>> with strange separation characters (this is just an example, not my >>> actual case). >>> >>> I don't know whether in the file-open dialogs there is actually a place >>> to do that, though.... >> >> For special cases one has the "join" command with its --tkey option. >> I suppose --tkey could be added for plain "open", although as you >> imply it wouldn't be trivial to find a suitable place for this in >> the GUI. >> >> But could you tell us what sort of CSV dates are not being >> recognized? Unless they're wildly idiosyncratic I think our >> heuristics could probably be modified to handle them. >> > > See attached. It's monthly data with date format "01/mm/yyyy", and I > guess the redundant leading "01/" confuses gretl.
Thanks, Sven. Gretl was trying to interpret the dates as MM/DD/YYYY. That interpretation "works", but produces something that's not a sensible time series (data for the first 12 days of each year) and therefore gets rejected. So now in CVS if we don't get a sensible interpretation we try looping back and using DD/MM/YYYY. Allin
