Current Date Plus Experation Date Via Database S’abonner

0
Avatar
Legacy Poster

Hi and thanks for taking a moment to help me. I am new to Bar Tender and have no problum adding the date with the offset by x number of days. But my issue is i pull my data from an Access data base and i have a field named exp date that is the number of days until experation for that item. each item has its own experation date i.e. 180 or 35, 27. So what i am tryiing to do is figure out how to have a date that is todays date + the experation number of days 3/1/2012 + 180. I have tried in the VB script choosing single line expression = field("the field name") + Date. i am getting 12386647 not 8/28/12 . is there a way to make this work?

Hope i made sense!!!
thanks
Brad

6 commentaires

0
Avatar
Ian Cummings
Modérateur
Actions pour les commentaires Permalien

What edition and version of BarTender are you using, or are you running with the Trial?
0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

9.4 Professional not a trial
0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

The below works for me I think. Multi-Line VB script in the field you need:

datestart = FormatDateTime(<DATABASE FIELD>,2)
Value = DateAdd("d",180,datestart)
0
Avatar
Shotaro Ito
Actions pour les commentaires Permalien

Consider you have number (180 or 35 etc) in a text datasource.
Text properties > More options > VB Script > OnProcessData
[code]If IsNumeric(Value) Then
Value = DateAdd("d",Value,Date)
End If[/code]
0
Avatar
Ian Cummings
Modérateur
Actions pour les commentaires Permalien

You might like to know that we have just released v10 of the BarTender Suite on Thursday afternoon, which among many new features supports date offsets from a database field directly without the need to use VB script.

If you are interested in upgrading or just testing the latest version, then feel free to download the Trial at the below link:

http://www.seagullscientific.com/aspx/free-bar-code-label-printing-software-download.aspx

For full details on the new features in BarTender Suite v10 please take a look at the What's New in BarTender v10 white paper:

http://s3.amazonaws.com/SeagullBarTender/ftp/WhitePapers/WhitePaper_WhatsNewInBT10.pdf
0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

I have found a bug with this.

I link in from an excel spreadsheet. The offset figure is a field in the spreadsheet.

If we select the labels to print at printing time and we choose different product from our "database" it picks up on the first offset number in the database and that gets used for all the products.

eg. Say I have threee product

Product1 with offset of 3 months
Product2 with offset of 10 months
Product3 with offset of 8 months

If I select each product individually at printing time it works as expected. The date is offset by the offset ammount set in the excel sheet. However if I want to select and print all three (and they are listed in order as above) it takes only the offset from the first list, in example above 3 months and uses that for all three labels.

[quote name='Ian C - Seagull Support' timestamp='1330674528' post='1881']
You might like to know that we have just released v10 of the BarTender Suite on Thursday afternoon, which among many new features supports date offsets from a database field directly without the need to use VB script.

If you are interested in upgrading or just testing the latest version, then feel free to download the Trial at the below link:

http://www.seagullscientific.com/aspx/free-bar-code-label-printing-software-download.aspx

For full details on the new features in BarTender Suite v10 please take a look at the What's New in BarTender v10 white paper:

http://s3.amazonaws.com/SeagullBarTender/ftp/WhitePapers/WhitePaper_WhatsNewInBT10.pdf
[/quote]

Vous devez vous connecter pour laisser un commentaire.