Date Code 关注

0
Avatar
Austin Lim

Hi Bartender Friends,

 

I'm newbie in bartender V10. I have problem to create date code for our product detail

We need to add in the shelf life 5 day and special date code request by hypermarket

Delivery Date 02/11/2016

We need display :

Best Before : 06/11/2016

Date Code : K06

 

K06 = NOVEMBER 6th

JAN=A

FEB=B

MARCH=C

APRIL=D

MAY=E

JUN=F

JULY=G

AUG=H

SEPT=I

OCT=J

NOV=K

DEC=L

 

Can I do it without any VB Script, coz I dunno how to do programming

 

1 评论

0
Avatar
Jasper Wen
版主
评论操作 固定链接

  • The "shelf life" date can probably be easily done with a date object and setting an offset transform.
  • The "special date code" you will need to use some simple visual basic script to accomplish. You just need to write a simple case statement or if...then...else statement. Visual basic script in this case can be set for OnProcessData event in the object properties->transforms->VB script.

Below is an example using a case statement in visual basic. You will need to modify it to fit your requirements but will give you an idea how the visual basic syntax will look like. Essentially, in this example if the value for the object is coming in as 1, 2, 3, etc., then it will display the appropriate month abbreviation JA, FE, MR, etc. accordingly:

Select Case value
  Case 1
    Value = "JA"
  Case 2
    Value = "FE"
  Case 3
    Value = "MR"
  Case 4
    Value = "AL"
  Case 5
    Value = "MA"
  Case 6
    Value = "JN"
  Case 7
    Value = "JL"
  Case 8
    Value = "AU"
  Case 9
    Value = "SE"
  Case 10
    Value = "OC"
  Case 11
    Value = "NO"
  Case 12
    Value = "DE"
End Select

请先登录再写评论。