Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Export to Excel or PDF or CVS Date format is wrong

  • teksur
  • teksur's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 10 months ago #137117 by teksur
Well, way I see it answer is already here. Someone just need put these 2 codes(Export Excel and Display responses) working together and then we have it :)
The topic has been locked.
  • holch
  • holch's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 10 months ago #137118 by holch
How about sponsoring the feature? As I said, I don't see that anyone will take this over any time soon.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • teksur
  • teksur's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 10 months ago #137119 by teksur

holch wrote: How about sponsoring the feature? As I said, I don't see that anyone will take this over any time soon.

What do you mean by sponsoring?
I am going to by premium package 12 months if I get this working somehow.
Someone said I could do plugin myself.
The topic has been locked.
  • holch
  • holch's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 10 months ago #137127 by holch
Well, I don't know what the premium package includes (this is from the Limesurvey GmbH), but from what I know it is the comfort update at the moment, which is well worth its money.

The rest is based on Limesurey's current features. If you require different features there are a few options:
  • - Make a feature request (which I think you already did) and wait for its implementation. However, just like with other software this might happen, or not. Even if you spend thousands of dollars/euros on commercial survey packages this is not guaranteed. Back in the day when we used a very expensive survey tool we had tons of feature requests, some made it in the package, others didn't.
  • Sponsoring: Find a developer that will implement this into Limesurvey, if possible. Of course they probably won't do this for free.
  • Implement it as a plugin (if possible).

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • teksur
  • teksur's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 10 months ago #137128 by teksur

holch wrote: Well, I don't know what the premium package includes (this is from the Limesurvey GmbH), but from what I know it is the comfort update at the moment, which is well worth its money.

The rest is based on Limesurey's current features. If you require different features there are a few options:

  • - Make a feature request (which I think you already did) and wait for its implementation. However, just like with other software this might happen, or not. Even if you spend thousands of dollars/euros on commercial survey packages this is not guaranteed. Back in the day when we used a very expensive survey tool we had tons of feature requests, some made it in the package, others didn't.
  • Sponsoring: Find a developer that will implement this into Limesurvey, if possible. Of course they probably won't do this for free.
  • Implement it as a plugin (if possible).


I thank you for explaining to me these options. I have to think about them.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 8 months ago #139931 by Joffm
Hi, teksur,
I know this topic may be outdated.
But I just want to explain a in my opinion short and easy way to transfer the database format "YYYY-MM-DD" to an EXCEL format (days since 1.1.1900 or whatever).
  1. Export your data as SPSS file (you only need the data file)
  2. Open this in EXCEL (delimiter is komma)
  3. Add a column after the date column (the date will look like '17-06-2016 00:00:00', maybe because of my German EXCEL)
  4. In the new column enter the formula "=RIGHT(LEFT(B1;11);10)*1"
  5. You will get the value 42528, the EXCEL representation of the date.
  6. This you can format to your need with the EXCEL functionality.

Kind regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #159353 by Joffm
Hello, emilyjohn,

why do you very frequently reply to absolutely outdated topics? And mostly insubstantial.

Here you just quoted a part of holch's answer 1 year 4 months ago.

What is the reason for that?

Regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu
The topic has been locked.
More
6 years 4 months ago #161413 by tomy137
Hi there,

This is an outdated topic but the associated Mantis likewise : bugs.limesurvey.org/view.php?id=11293

That's not a big deal, I don't understand why there is so few consideration about this question.

Maybe on this script (LimeSurvey/application/helpers/export_helper.php) :
Code:
  {
            $fieldno = strtoupper($field['sql_name']);
            if($field['SPSStype']=='DATETIME23.2') {
                // convert mysql  datestamp (yyyy-mm-dd hh:mm:ss) to SPSS datetime (dd-mmm-yyyy hh:mm:ss) format
                if (isset($row[$fieldno])) {
                    list( $year, $month, $day, $hour, $minute, $second ) = preg_split( '([^0-9])', $row[$fieldno] );
                    if ($year != '' && (int)$year >= 1900) {
                        echo $q.date('d-m-Y H:i:s', mktime( $hour, $minute, $second, $month, $day, $year ) ).$q;
                    } else {
                        echo ($na);
                    }
                }  else {
                    echo ($na);
                }
            }

Thanks in advance for your reply,
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 4 months ago #161414 by LouisGac
Hi tomy,

LimeSurvey is OpenSource, so if you're a PHP coder and you found a fix for a bug, feel free to submit a pull request to the gitHub repository:

github.com/LimeSurvey/LimeSurvey/blob/master/CONTRIBUTING.md
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 2 weeks ago #166687 by DenisChenu
PS : for excel, since we use github.com/mk-j/PHP_XLSXWriter , best is to set the column type to datetime format.
After : excel see really datetime, and user can set his own format easily.

Same can be done with numeric item, but i don't know if we can use #0.#

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose