Skip to main content

Search

Search

GS1-128 Date Pattern

Comments

5 comments

  • Avatar
    Al Perez
    Moderator

    Hi Lon, thank you for your post.

    Lon, I'd like to address two items for your request:

    1. When using GS1-based symbologies, you must abide by the patterns set by the Application Identifiers. This means that you cannot use the pattern of 'yyjjj' for your production date. A production date must use the pattern of 'YYMMDD', according to GS1. You can find more information about these patterns and standards on their website, gs1.org.
    2. If you're not using a GS1-based symbology, you can use your custom pattern of 'yyjjj'; just be sure that you've specified that you'd like to use a 'custom' pattern in the data source properties.

    Thanks for reaching out!

    0
  • Avatar
    Lon Empeno

    Thanks for clarifying and explaining the GS1-bases barcode. 

    If, however, I would like to custom the production date and expiry date using the date format pattern above. How do I change the expiry date to show four years from today. 

    For example: 

    Production Date: 2020/10/28 (YYYY/MM/DD)

    Expiry Date: 2024/10/28 (YYYY/MM/DD)

    Do I need a VBA script for this (expiry date)? If I do, can someone help with this script?

    Thanks, Lon 

     

    0
  • Avatar
    Peter Thane

    You could always use GS1 Application Identifiers 91 to 99 as these are custom AI's. Your scanning system would need to know that 91 meant the Production Date for example but apart from that you use them. However, if you are using a Date type then BarTender will restrict you to only use the correct YYMMDD format and so you will need to use VB to get round this,

    In the sample below I have added a Date Text field with a custom yyjjjj format and then given this string a name "Hello".

    In my barcode I have added a 91 AI and then VB script data string that sets the value of that field to be the value of "Hello" as you can see in the screenshot below

    0
  • Avatar
    Al Perez
    Moderator

    Hi Lon, unfortunately, our technical support team doesn't help with writing a script, however I don't think you need one in order to make the date four years from today.

    You can use a transform:

     

    If you open up your data source, one of the tabs is a Transform tab; from there, use the Properties yellow icon to transform your data to a constant of 4 years from today.

    Additionally, please note that while VBScript will give you the option to manipulate data in a GS1 symbology, you're essentially breaking standards and your barcode may not be valid. While it can be done, it's not recommended.

    0
  • Avatar
    Lon Empeno

    This is perfect! Thanks for all the help!

    0

Please sign in to leave a comment.