Basic label question, date & progressive numbering 追蹤

0
Avatar
Tracy Hull

I have a label with entry set up for date as MMDD. When entering single digit months, it drops the 0 before the month. For example I need it to show as 0910, but it changes to 910. How do I make it leave the 0?

Similarly, I have Drum # as 3 digit (001), but it drops the 0's before the 1. 

I assume there is a simple way to correct this, but have not been able to locate it.

Thank you 

2 意見

0
Avatar
Xabier Clemente
版主
評論操作 永久連結

Hi Tracy,

Thank you for posting your query in our Community Forums!

I believe the issue you are experiencing can be circumvented by modifying the display pattern. In order to do this, right-click on the text object displaying the date and select "Properties...":



Then navigate to the Data Type tab and select the "Custom" format. Afterwards change the Pattern to "dMM"; this way the pattern will lose the zeroes from the date instead of displaying these:



Hopefully, this will help. If you have further questions, please feel free to reach us again!

0
Avatar
Pete Thane
評論操作 永久連結

It looks like Xabier got that mixed up a bit, but the principle is the same. The date pattern should be set as ddMM to keep the full 4 digits.. 

For the second, 001 becoming 1, in the Transforms tab, you can set the minimum number of characters to 3 padding the data to the left with a specified character and the default is 0. For serialised fields there is also a setting in the appropriate Transforms setting to tell the string to keep the same number of characters which can help do the same if you have a repeating sequence (eg 01-10 would become for the 2nd batch 1-10 unless this setting is ticked) 

登入寫評論。