Export to Excel or PDF or CVS Date format is wrong

More
2 years 3 months ago #137127 by holch
holch replied the topic: Export to Excel or PDF or CVS Date format is wrong
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'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
The following user(s) said Thank You: DenisChenu

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #137128 by teksur
teksur replied the topic: Export to Excel or PDF or CVS Date format is wrong

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.

Please Log in or Create an account to join the conversation.

More
2 years 1 month ago #139931 by Joffm
Joffm replied the topic: Export to Excel or PDF or CVS Date format is wrong
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:

Please Log in or Create an account to join the conversation.

More
11 months 2 weeks ago #159353 by Joffm
Joffm replied the topic: Export to Excel or PDF or CVS Date format is wrong
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

Please Log in or Create an account to join the conversation.

More
9 months 2 weeks ago #161413 by tomy137
tomy137 replied the topic: Export to Excel or PDF or CVS Date format is wrong
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) :
  {
            $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,

Please Log in or Create an account to join the conversation.

More
9 months 2 weeks ago #161414 by LouisGac
LouisGac replied the topic: Export to Excel or PDF or CVS Date format is wrong
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

Please Log in or Create an account to join the conversation.

More
5 months 3 weeks ago #166687 by DenisChenu
DenisChenu replied the topic: Export to Excel or PDF or CVS Date format is wrong
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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!