Problem with date and time in xls

Dear users!
i have a column with type (start) name (observationdate), i want only dd/mm/yy format to be submitted to my database, but it send it in yyyy/mm/dd format, and beside, it send the time too, i want to have only date, no time, what should i do for this purpose.
thanks in advance.

You can edit time in your analysis software. Which software are you using for data cleaning?

Narendra

1 Like

thank you mr.imran, we integreated ODK with google sheet, it submit data to my sheet, and when i select date format (day/month/year) the cell do not accept it, because there is time together in the "date" cell, i wanted to arrange my form to submit only date, and the date should by in (day/month/year) format.
it would be better if we could do so.

My name is Narendra, and iamnarendrasingh is my usernamename.

As you are using google spreadsheet you can use trim method and below is link which will help you to do operations on google sheet. Below is link:
https://www.extendoffice.com/documents/excel/560-excel-remove-character-from-string.html

It's related to Data Management.

Narendra

1 Like

@iamnarendrasingh is correct that you could format the date/time as a post-processing step.

If you only want the date, I would encourage you to use type today instead of start. See http://xlsform.org/#metadata for more.

You should then be able to format the date in Google Sheets or alternatively you could introduce a hidden field ("calculate") with a formatted date:

+-----------+-----------------+-------+--------------------------------+
|   type    |      name       | label |          calculation           |
+-----------+-----------------+-------+--------------------------------+
| today     | today           |       |                                |
| calculate | today-formatted |       | format-date(today, "%e/%n/%Y") |
+-----------+-----------------+-------+--------------------------------+

For more about formatting dates, see https://opendatakit.github.io/xforms-spec/#fn:format-date.

5 Likes