跳至主內容

搜尋

搜尋

Date Code

評論

1 條評論

  • 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
    0

登入寫評論。