Select to view content in your preferred language

Barcode scanner - wonky dates?

420
5
06-03-2024 06:34 AM
ShelbyZelonisRoberson
Frequent Contributor

Hi,

I deployed a Survey123 connect with a barcode scanner question to collect driver's license information. I used the Barcode sample from Survey123. When I publish the survey and scan driver's licenses, I get varying issues for Date of Birth. Some people's licenses scan fine and DOB populates correctly. For others, the DOB is recorded as one day earlier than the license says. I just scanned my husband's and my licenses back-to-back - his shows his birthday a day early, whereas mine is correct. We both have driver's licenses from the same state. Help? This doesn't make any sense. I've tried it with a hosted and non-hosted feature service. Using Portal 11.2.

0 Kudos
5 Replies
ShelbyZelonisRoberson
Frequent Contributor

Adding an image that shows two records collected back-to-back. Same state for DL. One is right, one is wrong.  

0 Kudos
abureaux
MVP Frequent Contributor

I find date fields can be annoying at times. E.g., We have a bunch of sample data that is always off by one day thanks to Arc Pro adding a timezone by default (super annoying).

Unless you have a specific need for a "date" field, why not just dump the DOB into a "text" field? No chance of transformation errors that way.

0 Kudos
ShelbyZelonisRoberson
Frequent Contributor

I suppose I could do this, but I shouldn't have to. Why is one record being treated differently than another, it makes no sense.

0 Kudos
abureaux
MVP Frequent Contributor

It does seem a little wonky. It shouldn't be related to anything like leap years (there was one 1984) or time zones (since everything should be same time zone in your test).

Rather than dump data directly into a date field though, I'd dump it into a text field for at least testing purposes (if you haven't already) so you can see exactly what is being pulled by the barcode scanner.

Also, a question. Is this on iOS or android? If android, have you enabled "enhanced camera features" in S123?

0 Kudos
ShelbyZelonisRoberson
Frequent Contributor

I can see the raw data that is being pulled over and it has the correct dates. Somewhere in the conversion, sometimes the date gets converted wrong but sometimes not (see my screenshot above). It's crazy!

It's device agnostic but the sample I posted above is with the same iPhone collecting both records one after the other. 

0 Kudos