Page 1 of 1

VB Scripting for Julian date

Posted: Fri Dec 28, 2018 5:34 pm
by jphayes921
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 70 times
Production placard.nsln
(11.78 KiB) Downloaded 64 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.

Re: VB Scripting for Julian date

Posted: Wed Jan 02, 2019 2:16 pm
by Kyleodonnell

We would recommend opening a support case 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 ... cle-policy We'd recommend updating the label to 2017 to be used with the 2017 software

Re: VB Scripting for Julian date

Posted: Thu Jan 03, 2019 1:48 pm
by jphayes921
We are running 2017. The label was originally created in 6.5.

Re: VB Scripting for Julian date

Posted: Thu Jan 03, 2019 2:00 pm
by Kyleodonnell

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.