Display Xojo version, and build date in About window

Hi,

I actually set manually these data to show them in my About window:

xojo version,
project name.

But I failed with the build date: it displays now (run date, not build date).

The deal is to get these information at trouble time (Xojo version #, Project Name and Creation Date)…

Any idea to achieve that is welcome.

Global Properties:
dim BuildString as string
dim BuildStringShort as string

Sub MakeBuildString(MyType as integer)
if MyType = 0 then
BuildString = langVersion + cstr(app.MajorVersion) + “.” + cstr(app.MinorVersion) + “.” + cstr(app.BugVersion) + “.” + cstr(app.NonReleaseVersion) + " © 2009-" + cstr(app.BuildDate.Year)
BuildStringShort = cstr(app.MajorVersion) + “.” + cstr(app.MinorVersion) + “.” + cstr(app.BugVersion) + “.” + cstr(app.NonReleaseVersion)
else
dim BuildStunde as string
dim BuildMinute as string
dim BuildTag as string
dim BuildMonat as string
Sub MakeBuildString(MyType as integer)
if app.BuildDate.day < 10 then
BuildTag = “0” + cstr(app.BuildDate.day)
else
BuildTag = cstr(app.BuildDate.day)
end if

if app.BuildDate.Month < 10 then
  BuildMonat = "0" + cstr(app.BuildDate.Month)
else
  BuildMonat = cstr(app.BuildDate.Month)
end if

if app.BuildDate.Hour < 10 then
  BuildStunde = "0" + cstr(app.BuildDate.Hour)
else
  BuildStunde = cstr(app.BuildDate.Hour)
end if

if app.BuildDate.Minute < 10 then
  BuildMinute = "0" + cstr(app.BuildDate.Minute)
else
  BuildMinute = cstr(app.BuildDate.Minute)
end if

dim MyDateString as string
MyDateString = BuildTag + "." + BuildMonat + "." + str(app.BuildDate.Year) + "  " + BuildStunde + ":" + BuildMinute

BuildString = "Builddate: " + MyDateString
BuildStringShort = cstr(app.MajorVersion) + "." + cstr(app.MinorVersion) + "." + cstr(app.BugVersion) + "." + cstr(app.NonReleaseVersion)

end if
End Sub

Thank you Horst, seem to be OK.

I will try it this afternoon.

By the way, you can get rid of some of the if-then groups by using

Str(app.buildDate.month,“00”)

That’ll auto add the leading zeros.

Greg: thanks a lot.

I had to read the docs to be sure of what I read !

For some reason, I skipped that syntax !

Incredible (unglaublich)