VB Scripting for Julian date

Label printing integration (NiceWatch middleware and ActiveX programming interface)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
jphayes921
Newcomer
Posts: 2
Joined: Fri Dec 28, 2018 5:26 pm

VB Scripting for Julian date

Post by jphayes921 » Fri Dec 28, 2018 5:34 pm

dim startDate
startDate = Cdate("01/01")
Lot_Code =(CLng(right(DatePart("yyyy", Date),1) & (DateDiff("d", StartDate, Date) +1))) & "5184" & LineNumber

The above is currently use to create a lot code for printing. EX: 8362518401. My issue is when the year rolls over, and on day 001-009 and 010-099 the vb I have does not include the "0" or "00" before the day. In the past I have added "0" or "00" with an "&" at the beginning of the year and at day 100, but it is a pain to have to change every year 3 times.

I have also tried a variable Julian, but only returns the date format due to how I am printing. This VB is attached to a Variable Event. When changing the variable on prompt in a form. I have attached the form and label.
Produiction placard.lbl
(177.5 KiB) Downloaded 62 times
Production placard.nsln
(11.78 KiB) Downloaded 56 times
Label is an old format from previous nicelabel version, but still works in this scenario as of now. We are currently running 2017.

Any help to minimize me having to edit this a bunch of times in the year would be appreciated.

Thank you.

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 445
Joined: Mon Aug 28, 2017 3:07 pm

Re: VB Scripting for Julian date

Post by Kyleodonnell » Wed Jan 02, 2019 2:16 pm

Jphayes921,

We would recommend opening a support case https://www.nicelabel.com/support/technical-support However, the label format is much older and not supported as Version 6.5.1 has reached end of life for support as of December 31st, 2018 https://www.nicelabel.com/products/spec ... cle-policy We'd recommend updating the label to 2017 to be used with the 2017 software

jphayes921
Newcomer
Posts: 2
Joined: Fri Dec 28, 2018 5:26 pm

Re: VB Scripting for Julian date

Post by jphayes921 » Thu Jan 03, 2019 1:48 pm

We are running 2017. The label was originally created in 6.5.

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 445
Joined: Mon Aug 28, 2017 3:07 pm

Re: VB Scripting for Julian date

Post by Kyleodonnell » Thu Jan 03, 2019 2:00 pm

Jphayes,

The label itself is still a .lbl which a version 6 label. You would need to convert it to a .nlbl to test it as Version 6 is end of life for support.

Post Reply