Best Before Date
Im trying to add a script that will automatically work out my best before date. what I am trying to do is have a field that will work out the best before date a year ahead from todays date. i have found this script: value = NewDate = DateAdd("m", 1, "31-Jan-95")but when i test it it comes out with a date of 27/08/1895 (or something along those lines)
what am i doing wrong?
what am i doing wrong?
0
-
[quote name='martingrove' timestamp='1359556793' post='4255']
Im trying to add a script that will automatically work out my best before date. what I am trying to do is have a field that will work out the best before date a year ahead from todays date. i have found this script: value = NewDate = DateAdd("m", 1, "31-Jan-95")but when i test it it comes out with a date of 27/08/1895 (or something along those lines)
what am i doing wrong?
[/quote]
There are a couple ways to do that. If you want to forgoe VB scripting you can create a date object in BarTender, then use the 'date offset' function to add a year to the displayed date.
Otherwise, you'd use the script:[b] value = DateAdd("yyyy", 1, now)[/b] to add one year to today's date.0
Please sign in to leave a comment.
Comments
1 comment