Welcome, Guest
Username: Password: Remember me

TOPIC: "validuntil" field in CSV token import misreading date/time

"validuntil" field in CSV token import misreading date/time 2 years 8 months ago #71295

  • abatty
  • abatty's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Hi folks.

I'm on Version 1.91+ Build 11379.

I've been using LS for a few years now, but this is my first time using tokens.

I created a CSV to import my token table. One of the fields I've used is the validuntil field. However, no matter what I do, after import, it sets the "Valid Until" date/time to 30 Nov 1999 12AM. I need 21 Jan 2012 12AM.

The following all turn into the November date:

21.01.2012 00:00 (this should be the correct format, as far as I can tell)

1/21/12 0:00 (what Numbers helpfully changes it to... Grrrr... But it handles UTF-8 right, so I still use it for things like this)

1327071600 (epoch/UNIX date/time)

All the other fields come in fine. The CSV is in UTF-8 format, since the names are all Japanese.

I don't see this discussed in the forums or the bugtracker. Any ideas?

I can, of course, just set the survey to close on my date, and that should work fine, but I'm irritated by this issue. I want to do it with tokens.

Finally, as an aside, there is no way to do batch operations on the token table, is there?

Thanks much!
The administrator has disabled public write access.

Aw: "validuntil" field in CSV token import misreading date/time 2 years 8 months ago #71301

  • Steve
  • Steve's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 494
  • Thank you received: 46
  • Karma: 17
Hello,

perhaps it will help to create one dummy entry, set the "valid until" date and export the tokens. I did so and opened the .csv file with Notepad++. It said the format is "2012-01-21 00:00".
Mit freundlichen Grüßen/Best regards,

Stefan Gohlke
LimeSurvey Team
The administrator has disabled public write access.
The following user(s) said Thank You: abatty

Aw: "validuntil" field in CSV token import misreading date/time 2 years 8 months ago #71303

  • abatty
  • abatty's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Nice catch!

I've got the survey active for testing right now, but as soon as my partner takes it, I'll try that format and post the results.

Thanks!
The administrator has disabled public write access.

Re: Aw: "validuntil" field in CSV token import misreading date/time 2 years 8 months ago #71310

  • abatty
  • abatty's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
K, just tried it. That was it. Thanks for the great idea!

--Just added it to the documentation wiki.
Last Edit: 2 years 8 months ago by abatty.
The administrator has disabled public write access.

Re: Aw: "validuntil" field in CSV token import misreading date/time 2 years 8 months ago #71831

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
You're welcome :-)

If our hints have been helpful and you enjoy limesurvey please consider a donation to the team .
We do all this in our free time and you don't have to pay a penny for this software.

Without your help we can't keep this project alive.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.114 seconds
Donation Image