American Date Format

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
Dundoan
Enthusiast
Posts: 6
Joined: Thu Feb 11, 2010 4:47 pm

American Date Format

Post by Dundoan » Thu Feb 11, 2010 4:56 pm

Hi,

I am using Nice Labels with a factory floor system. On a label I am calculating the week number from a variable within the system. I have created a PACK_DATE variable which is of type date and then use the DATEPART function to get the week no. On my PC everything works OK. On the first terminal the week no displays OK but on the second terminal if the date is before the 12th day of the month, Nice Labels converts it to the American date format and thus the week number is calculated wrong. My PC and both terminals have the regional settings as UK. I have nice label print only on the terminal and if I preview the label there it displays the week number wrong on one of the terminals.

Example

PACK_DATE 11/02/2010
Terminal 1 Week No 07
Terminal 2 Week No 45 (thinks it's 02/11/2010)

Any help would be appreciated as this is driving me to distraction

alesp
NiceLabel Development
NiceLabel Development
Posts: 153
Joined: Tue Sep 26, 2006 1:26 pm
Location: Kranj, Slovenia
Contact:

Re: American Date Format

Post by alesp » Fri Feb 12, 2010 7:47 am

You should check the input and output format properties of the variable. Make sure they are set to the right format. You can find them on the "Validation" page of the "Variable" dialog box. If you do not see that page click the "Advanced >>" button at the bottom of the dialog box.

Best regards,

Ales
Regards,

Ales

Dundoan
Enthusiast
Posts: 6
Joined: Thu Feb 11, 2010 4:47 pm

Re: American Date Format

Post by Dundoan » Fri Feb 12, 2010 10:53 am

Both the input and Output formats for the PACK_DATE are dd/mm/yyyy. If I open the label on my PC in designer mode the week no calculation works but if I open the same label on the terminal which has a print only version of Nice Labels it uses the PACK_DATE in the American date format.

primoz
NiceLabel Development
NiceLabel Development
Posts: 22
Joined: Wed Nov 29, 2006 2:10 pm

Re: American Date Format

Post by primoz » Mon Feb 15, 2010 8:52 am

It is hard to replicate the problem from the description above. Can you please send me the label file in question and I will try to replicate the problem.

See private messages for my e-mail.

Dundoan
Enthusiast
Posts: 6
Joined: Thu Feb 11, 2010 4:47 pm

Re: American Date Format

Post by Dundoan » Mon Feb 15, 2010 1:16 pm

Big thanks to Primoz

Solution

Create a function called WW_PACK_DATE and in the vb script simply set it equal to PACK_DATE i.e. Result=PACK_DATE. Then go into the variables and select WW_PACK_DATE and under the validation section set it to be a date with an Input format of dd/mm/yyyy and an Output format of ww. This worked on the terminal that was using the American date format when I used the DatePart function in vb.

Post Reply