Subtracting 2 dates to get days difference
Hello,
I've got 2 dates - UseBy & DepotDate.
By subtracting the 2 dates I have calculated the product shelf life which i need for the label.
I use the vb below and with the dates formatted as dd/mm/yy I get a script error. The only way I can get it to work is if I convert the dates to Julien date.
However that will trip over when we start 2021 as depot date maybe in 2020 and the use by in 2021
Format.NamedSubStrings("UseBy").Value - Format.NamedSubStrings("DepotDate").Value
How can i get around this?
0
-
Hi,
You need to use the DateDiff command as per the image below
0 -
Thanks Pete,
that's brilliant. Thanks for your help.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare