Importing current date by scanning barcode

I would like to be able to import the current date by scanning a barcode so I’m wondering how I’d go about setting that up

The date is in the barcode? Or do you need the date the barcode was scanned?