Help with date

Issues related to label design (working with databases, data processing, RFID encoding etc.) and printing (from NiceLabel Express, NiceLabel Pro, NiceForm and NicePrint)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
Milan Nagy
Enthusiast
Posts: 8
Joined: Thu Jul 26, 2007 11:23 am

Help with date

Post by Milan Nagy » Thu Jul 26, 2007 11:26 am

Hello.
I'm using this great programm, but I need help. I'm making label with abnormal date format. It's number|letter.
Number is year (2001 - 1, 2002 - 2, 2003 - 3 etc.)
Letter is month (jan. - B, feb. - C, mar. - D, apr. - F, may - G, jun - H, jul - J, aug. - K, sep. - L, oct. - M, nov. - N, dec. - P)
So october 2007 should looks like 7M
Input for this date is system clock/date.
Can you help me please?
Thank you.

User avatar
lpatty
NiceLabel
NiceLabel
Posts: 60
Joined: Mon Sep 11, 2006 4:15 pm
Location: Milwaukee, WI
Contact:

Post by lpatty » Fri Jul 27, 2007 4:16 am

You will need to handle this with a VB script function. Create a Visual Basic Script Function in Pro (Data|Functions menu). Just call the output variable DateCode. this script does not require a Date variable in NiceLabel. It simply takes the date directly from the PC clock. After finishing, use the DateCode variable created by the NiceLabel function on your label design. This should do what you want:

Dim YR, MN

YR = Right(Year(Now),1)

Select Case Month(Now)
Case "1"
MN = "B"
Case "2"
MN = "C"
Case "3"
MN = "D"
Case "4"
MN = "F"
Case "5"
MN = "G"
Case "6"
MN = "H"
Case "7"
MN = "J"
Case "8"
MN = "K"
Case "9"
MN = "L"
Case "10"
MN = "M"
Case "11"
MN = "N"
Case "12"
MN = "P"
End Select

Result = YR & MN

Milan Nagy
Enthusiast
Posts: 8
Joined: Thu Jul 26, 2007 11:23 am

Post by Milan Nagy » Fri Jul 27, 2007 8:10 am

Thank U! You really help me..

Post Reply