Conversion To Julian Date Help S’abonner

0
Avatar
Legacy Poster

I am using a trial version of Bartender Professional to replicate a label we created several years ago with another product.  About a year ago the computer that the software was loaded on died.  We were transitioning to a new MIS at the time, so we tried to recreate the label in Crystal Reports to print directly from the MIS.  That was successful when printing to a laser printer.  However the barcodes are not scannable when printed from our Zebra GC420d label printers.  We really need the ability to print these labels from our Zebra printers.

 

Our client dictates the format we must use for the label.  I have completed it except for one field.  Once I get that tackled, I intend to purchase Bartender Professional plus a couple print-only copies.

 

The field in question is a Date/TIme field from our SQL (2008) database.  The client requires the date to be formatted as VDyddd.  The prefix "VD" is easy.  However, I am stumped as to the process to transform the date to the yddd format, where y is the last digit of the year and ddd is the Julian date.

 

Any help is much appreciated.

 

Thanks,

 

Paul Kuestersteffen

Mainline Printing, Inc.

Topeka, KS

8 commentaires

0
Avatar
Michael Toupin (mtoupin
Actions pour les commentaires Permalien

You'll want to use jjj for a 3 digit julian date.  

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

Mike,

 

I'm fairly illiterate on the programming.  Can you walk me through where and how to make the transform.

 

Thanks,

 

--PK

0
Avatar
Kai Kohler
Actions pour les commentaires Permalien

You shouldn't need to use VB for formatting the date.  You can open the properties of that object and select the data source. On the Data Type tab, change it to Date.  Then you can change the format to Custom, and type in the format you want yjjj.  It will then display the date in that format.

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

OK, that's close, and very easy, but not quite it.  yjjj returns two digits for the year + the three digit Julian date.  How do I drop the decade digit?

0
Avatar
Kai Kohler
Actions pour les commentaires Permalien

Transforms tab -> Truncation -> Drop first character on the left

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

The truncation transform is not available for a date data type.  However, I figured out a way around it.  I added a new field to the label to pull the data and transform the date and with a font color of white to suppress it.  Then I changed the field I want to print to a data source type "Object Value" calling the text box I just created, then I made the text transforms to it.

 

Thanks to Kai K. and Mike T. for all the help.  My label is now finished!!!

0
Avatar
Levi Hargrove
Modérateur
Actions pour les commentaires Permalien

I was going to recommend that way as well, Pkuesters. But I will make one more recommendation, do not set the font value as white, instead just drag/drop that object off of the label. You can reference objects off of the label still because technically their data exists, even at print time. 

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

Thanks Levi.  I will do that.

Vous devez vous connecter pour laisser un commentaire.