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 #136883 by teksur
I have version Version 2.50+ Build 160525.
Display responses date looks like this:
14.02.2012
Export to Excel or PDF or CVS result is this:
2012-02-14 00:00:00

Any idea why?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 10 months ago #136893 by DenisChenu
Because : we always use english date format when exporting.

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.
  • teksur
  • teksur's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 10 months ago #136962 by teksur

DenisChenu wrote: Because : we always use english date format when exporting.


Why? I don't get the logic behind this.
I want to use date format dd.mm.yyyy in survey. It is natural for me to use it also in Excel file when I need to work there.
How do I manage this problem?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 10 months ago #136964 by DenisChenu
Make a feature request or make an "new export plugin"

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.
  • teksur
  • teksur's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 10 months ago #136965 by teksur

DenisChenu wrote: Make a feature request or make an "new export plugin"

Thanks, I made feature request.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 9 months ago #137036 by holch
It is always good to make a feature request. It shows the developers where improvements can be made, what the users out there need/want, etc.

However, I have my doubts that this will be implemented any time soon. It is very common that while the date might be changed in the application itself, within the database one format is fixed. Of course it would be a nice to have, but I think there are far more important things on the feature request list than this. Especially as you can correct this fairly easy in Excel.

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 9 months ago #137050 by teksur

holch wrote: Especially as you can correct this fairly easy in Excel.

Could you share me this easy way pls?
I tried to change format in cell and that unfortunately did not work.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 9 months ago #137062 by holch
Well, depending on the number of response I would either look for a formula on how to convert 2012-02-14 into 14.02.2012.

But if the number of entries and the time range isn't too big, I would sort the table regarding date and then copy the correct date to all from the same day. If you have a survey going on for many days, then this is of course quite tedious. Then I would look into formulas in Excel to convert this. If you want to go the formula way, this could be a start. Someone is trying to do the exact oposite of you, but it should give you some idea on how to proceed.

superuser.com/questions/793137/how-to-co...-mm-dd-in-excel-2007

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 9 months ago #137087 by teksur

holch wrote: Well, depending on the number of response I would either look for a formula on how to convert 2012-02-14 into 14.02.2012.

But if the number of entries and the time range isn't too big, I would sort the table regarding date and then copy the correct date to all from the same day. If you have a survey going on for many days, then this is of course quite tedious. Then I would look into formulas in Excel to convert this. If you want to go the formula way, this could be a start. Someone is trying to do the exact oposite of you, but it should give you some idea on how to proceed.

superuser.com/questions/793137/how-to-co...-mm-dd-in-excel-2007


Thank you for these, but I don't think this is good idea to work this in Excel. This survey what I am working now will last for years and there are birthdays and similar things. I don't need any calculation for them. I am using this as database form and this dump to Excel is very important, because rest of work will be done in Excel. This form has more than 100 questions.

In datebase date is in right format for me dd.mm.yyyy so in export you have code that will change that to yyyy-mm-dd and add time 00:00:00(I don't know why, not needed at all)
From my perspective it has too much PHP for me :)
So little tick in Export don't change my date to yyyy-mm-dd format would be great! :)
I don't know PHP, but I have hunch that it would not need so many if and else commands from good PHP coder like you :laugh:
I only see one other option that I would have to loose this date picker component and use normal textfield where they have to enter date in dd.mm.yyyy format.

What do you think?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 9 months ago #137088 by DenisChenu

teksur wrote: In datebase date is in right format for me dd.mm.yyyy so in export you have code that will change that to yyyy-mm-dd and add time 00:00:00(I don't know why, not needed at all)

DateTime format in SQL : always Y-M-D h:m:s

ANd if you import a 01/02/03 in excel in french or in english : date is different. Using same format , always : you are sure firt is year, seond i month and last is day of month.

Denis

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.
  • teksur
  • teksur's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 9 months ago #137093 by teksur

DenisChenu wrote:

teksur wrote: In datebase date is in right format for me dd.mm.yyyy so in export you have code that will change that to yyyy-mm-dd and add time 00:00:00(I don't know why, not needed at all)

DateTime format in SQL : always Y-M-D h:m:s

ANd if you import a 01/02/03 in excel in french or in english : date is different. Using same format , always : you are sure firt is year, seond i month and last is day of month.

Denis

I was little confused, because you said earlier that "Because : we always use english date format when exporting." You are right it is in database this yyyy-mm-dd format. But you are able to show this in in my format dd.mm.yyyy in Browse responses -> Display responses. Everything is fine for me in there. Why I can't have this to Excel?
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 9 months ago #137109 by holch
One thing is how things are displayed (just a reformatting), the other aspect is how it is saved in the database.

I am not a real programmer myself, but I know a few things. And it is never that simple as it looks. When you make those supposed "minor" changes, there can be a lot of impact. For example: EM can use date to make calculations. If the format written into the database is not always the same, EM needs to identify the format and be able to work with it. That is a big deal.

There is probably some way to read the date out of your question, reformat it and write it into an equation type question, but this is out of my league.

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.

Lime-years ahead

Online-surveys for every purse and purpose