Hi ,We have a date format issue with the ODK

What is the problem? Please be detailed.
Date format is coming in different formats even when we have used 'format-date (today(), '%e-%n-%Y')'.
When i export data from the aggregate some dates are in dd-mm-yyyy fromat and some are in dd/mm/yyyy ,how can we resolve this problem .Thanks

What ODK tool and version are you using? And on what device and operating system version?
we are using both odk collect and aggregate.

What steps can we take to reproduce the problem?

What you have you tried to fix the problem?

Anything else we should know or have? If you have a test form or screenshots or logs, attach here.

Sometimes ODK import dates in different format, and you can change that by using your statistical package/software i.e. SPSS,R,Python,Excel,Stata etc.

even if it changes the date format should be same for the whole export.
Some rows have different date formats than other

Yes you are right, it sounds very weird i didn't get these kind of situation.
It's like you have date variable and that variables has 10 entries and out of 10 5 are in different format and other 5 is in different format. Am i correct?

yes, that's exactly whats happening , i just checked and found that if i export data in json then the issue is not happening.Thanks

So, your problem has been resolved.
Sounds cool, And learnt new thing that if we export data into JSON than this problem will not occur.
@yanokwa you can make this as solve now.

Well done finding a way to work around the problem, @Adarsh_Bisht! For future reference, you can actually mark an answer as a solution yourself:

It would be nice to know a little bit more about how this happened so that it can be fixed or at least documented as a limitation. Can you think of anything that would be different between the dates that were exported in one format and those exported in another? Were some in a repeat, for example? A group? Were they all of type date or maybe some of type datetime?

If your form is ok to share in public, it would be helpful to see it and know which fields were exported in what way.

1 Like