Dyanmic date formatting

Issues related to label design (working with databases, data processing, RFID encoding etc.) and printing (from NiceLabel Express, NiceLabel Pro, NiceForm and NicePrint)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
MaxvGerwen
Enthusiast
Posts: 15
Joined: Wed Jan 30, 2019 3:48 pm

Dyanmic date formatting

Post by MaxvGerwen » Mon Mar 30, 2020 12:11 pm

Hello,

We are running into some problems regarding dynamic expiry date formatting.

We are using microsoft sql culture codes to change the date formatting input to nicelabel. Depending on the destination, a different expiry date format is send to nicelabel. For example:
- USA: MM/DD/YYYY
- Netherlands: DD/MM/YYYY
- X destination: D-M-YY etc..

Our expiry date needs to be:
- as defined in the culture code format (xxxxxxxx).
- to be adjusted for a gs-128 barcode (YYMMDD).

There seems to be only 1 specific input option for date variabels, see attachment. Therefore we cannot use the variable type DATE and thus format towards the barcode.

Is there something im missing?

Thanks in advance.
Regards,
Max
Attachments
Date input.jpg
Date input.jpg (52.23 KiB) Viewed 1206 times

highfrost
Valued Contributor
Posts: 34
Joined: Tue Aug 19, 2014 10:51 am

Re: Dyanmic date formatting

Post by highfrost » Tue Mar 31, 2020 10:44 am

Hello Max,

These are examples not definite choices.
Just type in yyMMdd ;)

kind regards

PS I know, its a bit weird :)

MaxvGerwen
Enthusiast
Posts: 15
Joined: Wed Jan 30, 2019 3:48 pm

Re: Dyanmic date formatting

Post by MaxvGerwen » Tue Mar 31, 2020 11:13 am

highfrost wrote:
Tue Mar 31, 2020 10:44 am
Hello Max,

These are examples not definite choices.
Just type in yyMMdd ;)

kind regards

PS I know, its a bit weird :)
The problem is that our input format is dynamic. Sometimes the data we send to nicelabel will be formatted as "dd/mm/yyyy" or "mm/dd/yyyy" or any other format. We cannot set the nicelabel variabel to deal with a dynamic input. we can differentiatie between label and barcode variable by changing the output. For this we need to have the variable as type "date". But due to the different inputs it will result in errors.

highfrost
Valued Contributor
Posts: 34
Joined: Tue Aug 19, 2014 10:51 am

Re: Dyanmic date formatting

Post by highfrost » Tue Mar 31, 2020 12:34 pm

Ah I see...

To the best of my knowledge you will have to indicate what the input format is and create a mapping script accordingly.
I don't think Nicelabel can by itself determine whether 02-01-20 means 02 Jan 20 or 01 Feb 20 or 20 jan 02 etc.

MaxvGerwen
Enthusiast
Posts: 15
Joined: Wed Jan 30, 2019 3:48 pm

Re: Dyanmic date formatting

Post by MaxvGerwen » Tue Mar 31, 2020 12:53 pm

highfrost wrote:
Tue Mar 31, 2020 12:34 pm
Ah I see...

To the best of my knowledge you will have to indicate what the input format is and create a mapping script accordingly.
I don't think Nicelabel can by itself determine whether 02-01-20 means 02 Jan 20 or 01 Feb 20 or 20 jan 02 etc.
It seems like it is not possible. We are however sending the information as a type "date" through SQL. Therefore maybe there is something where nicelabel can recognize it as a date :?: .

Post Reply