calculate best before date by Julian calendar day
Hello,
I'm new to this world of vb script and I can not figure out how to solve my problem.
I have a label in which I report the day I created the product with the Julian calendar.
For the best before date I use the classic date instead dd/mm/yyyy and calculate the expiry days of the product with the offset expressed in days.
when I launch a print, the summary of the data in question comes out in the form of data entry form.
I can manually change the production day and the deadline, this leads to possible typing errors of the operator and therefore to the printing of labels with incorrect data
is it possible to create a script in VB with which in the control mask, if I insert a day expressed with the Julian calendar, the same automatically calculates the expiration of the product based on the set offset?
In addition it is also possible to insert a control string where if the date that is inserted is lower than the date of the computer the printing stops?
I hope some of you can help me!
PS I have BarTender Ver. 10.0 SR4
Best Regards,
Toni
-
I try to do something but i don't understand why my code don't work!
Can someone help me?
This is what i do for now;
date1 = DateAdd("d",("60"),Date)
date2 = "Date"
Format.NamedSubStrings("SCADENZA").Value = "date1"
If Format.NamedSubStrings("SCADENZA").Value <= "date2" Then
Call Format.CancelPrinting("ATTENZIONE! Scadenza sbagliata","")
else Format.NamedSubStrings("SCADENZA").Value = date1
End If0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar