Field From Date Prompt That Is 49 Months In The Future Follow

0
Avatar
Legacy Poster

Hi,

We are using a really old version of Bartender 8.01. I have a label which has a prompt for a date eg 19/02/2015, the source is date and this works fine, but what I now need is another field that calculates 49 months into the future and is formatted like YYYY MM

 

Anyone have any ideas how to accomplish this?

 

Regards,

Mick.

 

2 comments

0
Avatar
Shotaro Ito
Comment actions Permalink

You need to do some VB script in OnPostPrompt event, use DateAdd function and create custom date format.

 

OnPostPrompt event in VB script. 

 
DateAdd
 
Create desired date format.
 
Actually - Apply date offset on User Prompt (Data Entry Form) and Apply custom date format are now supported in BarTender 10.1 without help of VB Script.
I recommend to upgrade to 10.1 SR4 - please contact to regional reseller.
 
0
Avatar
Legacy Poster
Comment actions Permalink

Hi,

Thanks for your reply. I had already found the OnPostPrompt event and was able to get this working.

 

I used the following code on the OnPostPrompt event

value = DateAdd ("m", 49, Format.NamedSubStrings("Manu_Date").Value)
value = Right (value, 4) & "   " & Mid (value, 4, 2)

And this gave me the result I wanted ie. YYYY MM

 

Thanks again for your reply.

 

Regards,

Mick.

Please sign in to leave a comment.