The script has to be placed before Build, not after.
Var result As String
result = DoShellCommand("date /t") ' I compile on windows os and it gives me 05.04.2022
PropertyValue("App.MajorVersion") = result.NthField(".", 3) ' year
PropertyValue("App.MinorVersion") = result.NthField(".", 2) ' month
PropertyValue("App.BugVersion") = result.NthField(".", 1) ' day
Now, depending where in the world you are located, the date might be formatted different from mine. Experiment with the nthfields above to get what you need.