Add calculated field to my form?

I have a form that can be submitted and edited, I need to add calculated field updated_at that should be the timestamp. this will allow me to query submissions that have changed for a period of time.
The submissions will be done from the browser.
I have used this function
https://docs.opendatakit.org/form-operators-functions/?highlight=now#now
but it only gives dateTime on a format that is hard to compare

I am using ODK within Kobotoolbox

I get this format 2019-09-26T16:19:34.334+01:00, I would like a timestamp that is not timezone related. this way I can filter submissions based on this field.

Hi @Evance_Soumaoro

Welcome to the Forum!
When you have time, please introduce yourself here.

Not sure in which format you need the date, but you can manipulate it in a calculated field by using the substr(string, start[, end]) command.

I hope this helps!

Best,
Andrea

Thanks for the reply but I have updated my issues:
I get this format 2019-09-26T16:19:34.334+01:00, I would like a timestamp that is not timezone related. this way I can filter submissions based on this field. timestamp :1569859808
@Andrea_Martin I noticed you have been in Sierra Leonne, this is actually for a project in SL. :blush:

Hi @Evance_Soumaoro

Not sure if there's a way to select the format in UTC instead of current time zone.
As a workaround, my suggestion would be to play with the string by extracting the time and adding/subtracting the time difference as needed.

An additional suggestion when doing data collection offline is be to prompt the enumerator to enter or validate the default date/time of the device. When battery runs out or if rebooted, the device might lose the date/time configuration.

p.s. Nice! Sierra Leone is such an amazing place. All the best with your project!

1 Like

Yep that is what I am doing now. Thanks